#include <Misc.au3>
Global $hDLL = DllOpen("user32.dll")
HotKeySet("{SPACE}","RSendHold")
Send("{NUMLOCK on}")
While 1
sleep(60)
Wend
Func RSendHold()
If _IsPressed("26", $hDLL) Then
Send("{NUMPADADD down}")
Send("{NUMPAD8 down}")
Send("{NUMPADADD up}")
Send("{NUMPAD8 up}")
Endif
If _IsPressed("28", $hDLL) Then
Send("{NUMPADADD down}")
Send("{NUMPAD2 down}")
Send("{NUMPADADD up}")
Send("{NUMPAD2 up}")
EndIf
If _IsPressed("25", $hDLL) Then
Send("{NUMPADADD down}")
Send("{NUMPAD4 down}")
Send("{NUMPADADD up}")
Send("{NUMPAD4 up}")
EndIf
If _IsPressed("27", $hDLL) Then
Send("{NUMPADADD down}")
Send("{NUMPAD6 down}")
Send("{NUMPADADD up}")
Send("{NUMPAD6 up}")
EndIf
EndFunc
DllClose($hDLL)
exit
=======================
keys get stuck sometimes ( usually left arrow - numpad4 or numpad 6) , i tested adding a little sleep (50) between the down and up release but same thing
i want the script to wait for Spacebar - hotkey , then i want it to wait for either one of the arrow keys (the nampad respective numbers ) to be pressed so it immidiately sends the respecive sequences depending on the numkey that was pressed after the hotkey is triggered and then go to while loop and wait for next time spacebar is clicked
i want both the keypresses to be simulated as being held together as for example right key and + key are held down and send together like when we press and hold control alt del for taskmanager
i occasionaly get keys stuck , whats wrong with the script ?