Code: Select all
$Pgup:: ; Runs calculator with numlock on
run, c:\windows\system32\calc.exe
winwaitactive, ahk_class SciCalc
GetKeyState, state, numlock, T
if state = u
SetNumLockState, On
winwaitclose, ahk_class SciCalc
GetKeyState, state, numlock, T
if state = d
SetNumLockState, Off
return