Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Waiting for Ctrl+Up
#2
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:
Code:
Copy      Help
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.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)