AutoHotInterception/Context Example.ahk

22 lines
360 B
AutoHotkey
Raw Normal View History

2018-03-07 20:46:37 +00:00
#SingleInstance force
#Persistent
#include Lib\AutoHotInterception.ahk
2018-03-30 18:04:58 +00:00
AHI := new AutoHotInterception()
id1 := AHI.GetKeyboardId(0x04F2, 0x0112, 1)
cm1 := AHI.CreateContextManager(id1)
2018-03-07 20:46:37 +00:00
return
2018-03-30 18:04:58 +00:00
#if cm1.IsActive
2018-03-07 20:46:37 +00:00
::aaa::JACKPOT
1::
ToolTip % "KEY DOWN EVENT @ " A_TickCount
return
1 up::
ToolTip % "KEY UP EVENT @ " A_TickCount
return
#if
^Esc::
ExitApp