04-19-2018, 01:01 AM
I want to use the menu to open Google from the browser, but the runtime prompts error
Just contact programming, I hope someone can help me, any opinions and suggestions are welcome, thank you
Macro Macro1
Just contact programming, I hope someone can help me, any opinions and suggestions are welcome, thank you
Macro Macro1
str md=
;BEGIN MENU
;>&File
;,&open google :502 0x0 0x0 Cg
;,-
;,E&xit :2 0x0 0x0 Aq
;,<
;END MENU
str dd=
;BEGIN DIALOG
;0 "" 0x90CB0AC8 0x0 0 0 412 222 "Dialog"
;4 ActiveX 0x54030000 0x0 12 16 392 172 "SHDocVw.WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}"
;1 Button 0x54030001 0x4 292 196 48 14 "OK"
;2 Button 0x54030000 0x4 356 196 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""
str controls = "4"
str ax4SHD="www.quickmacros.com"
if(!ShowDialog(dd &sub.DlgProc &controls 0 0 0 0 0 0 0 0 md)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,SHDocVw.WebBrowser-- we4
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 502 ;;&open google
,we4.Navigate("http://www.google.com")
ret 1