Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Customize hotkey switch URL
#10
yes but thats is the proper way to do it 
can do code like this


Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90CA0AC8 0x0 0 0 900 432 "dialog"
;4 ActiveX 0x54030000 0x0 0 0 900 432 "SHDocVw.WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""

str controls = "4"
str ax4SHD
ax4SHD="www.bing.com"
if(!ShowDialog(dd &sub.DlgProc &controls)) ret

#sub DlgProc
function# hDlg message wParam lParam
int- acel
sel message
,case WM_INITDIALOG
,DT_SetAccelerators hDlg "401 F1[]402 F2[]403 F3[]404 F4[]405 Cc[]411 F11[]412 CF12"
,acel=1
,SHDocVw.WebBrowser we4
,we4._getcontrol(id(4 hDlg))
,DT_SetAutoSizeControls(hDlg "4s")
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_CLOSE
,DT_Ok(hDlg)
ret
;messages2
sel wParam
,case IDOK
,ifk(Y)
,,key Y           ;; Enter
,,ret 0
,case IDCANCEL
,ret 0
,case [401,402,403,404]
,err-
,we4._getcontrol(id(4 hDlg))
,sel wParam
,,case 401 we4.Navigate("http://www.google.com")
,,case 402 we4.Navigate("http://www.facebook.com")
,,case 403 we4.Navigate("http://www.sina.com")
,,case 404 we4.Navigate("http://www.baidu.com")
,err+
,case 405 ;;mes "ctrl+c"
,
,case 411 ;;mes "F11"
,if max(hDlg)
,,SetWinStyle hDlg WS_CAPTION 1
,,SetWinStyle hDlg WS_BORDER 1
,,res hDlg
,else
,,SetWinStyle hDlg WS_CAPTION 2
,,SetWinStyle hDlg WS_BORDER 2
,,max hDlg
,case 412 ;;mes "ctrl+F12"
,if acel =1
,,DT_SetAccelerators hDlg "401 F1[]402 F2[]403 F3[]404 F4[]412 CF12"
,,acel =0
,else
,,DT_SetAccelerators hDlg "401 F1[]402 F2[]403 F3[]404 F4[]405 Cc[]411 F11[]412 CF12"
,,acel=1
ret 1


Messages In This Thread
Customize hotkey switch URL - by win - 05-23-2018, 01:32 AM
RE: Customize hotkey switch URL - by Kevin - 05-23-2018, 01:59 AM
RE: Customize hotkey switch URL - by win - 05-23-2018, 03:12 AM
RE: Customize hotkey switch URL - by Kevin - 05-23-2018, 03:25 AM
RE: Customize hotkey switch URL - by win - 05-23-2018, 03:33 AM
RE: Customize hotkey switch URL - by Kevin - 05-23-2018, 03:42 AM
RE: Customize hotkey switch URL - by win - 05-23-2018, 03:46 AM
RE: Customize hotkey switch URL - by Kevin - 05-23-2018, 04:01 AM
RE: Customize hotkey switch URL - by win - 05-23-2018, 04:28 AM
RE: Customize hotkey switch URL - by Kevin - 05-23-2018, 04:37 AM
RE: Customize hotkey switch URL - by win - 05-24-2018, 07:14 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)