02-04-2007, 07:44 AM
Wait for Up, and then
if(GetMod!=2) key+ U; continue
Not tested.
Or, instead of
rep
,wait 0 KF CU ;; wait for Ctrl+Up
Use RegisterHotKey:
The example registers 2 hotkeys. You need only 1.
if(GetMod!=2) key+ U; continue
Not tested.
Or, instead of
rep
,wait 0 KF CU ;; wait for Ctrl+Up
Use RegisterHotKey:
def MOD_ALT 0x0001
def MOD_CONTROL 0x0002
def MOD_SHIFT 0x0004
def MOD_WIN 0x0008
if(!RegisterHotKey(0 1 MOD_CONTROL VK_PRIOR)) end "RegisterHotKey 1 failed"
if(!RegisterHotKey(0 2 MOD_CONTROL VK_NEXT)) end "RegisterHotKey 2 failed"
;...
MSG m
rep
,if(GetMessage(&m 0 0 0)<1) ret
,sel m.message
,,case WM_HOTKEY
,,sel m.wParam
,,,case 1
,,,out "hotkey 1"
,,,case 2
,,,out "hotkey 2"
,,,
,,
The example registers 2 hotkeys. You need only 1.