I got an external Numpad and would like to use just these keys to trigger some actions. The keys on my main keaboard shouldn't be affected.
For example I am trying to set up a script, which reloads my scripts that are always active from startup by pressing Numpad0.
It does kinda work, but sometimes the original key function (0) is also sent. I am using context mode. Mostly because I do not know the difference to subscription mode and I only got it working at times.
Code: Select all
#SingleInstance force
#Persistent
#include Lib\AutoHotInterception.ahk
AHI := new AutoHotInterception()
id1 := AHI.GetKeyboardId(0x1A2C, 0x2124)
cm1 := AHI.CreateContextManager(id1)
return
#if cm1.IsActive
Numpad0::
Process, close, Sort.exe
Process, close, Combined.exe
Process, close, ProCall.exe
Process, close, Print.exe
Process, WaitClose, Print.exe
Run, %A_MyDocuments%\Sort.exe
Run, %A_MyDocuments%\Combined.exe
Run, %A_MyDocuments%\ProCall.exe
Run, %A_MyDocuments%\Print.exe
return
#if
Most likely not the smartest way to do so
Best regards
Fisatec