I have this piece of code, so when i press CTRL is start to write in console but i cant stop it when i press CTRL again, i tried to change key for stop but dont works too it loop all time.
And can _IsPressed() keys can be custom made like CTRL a, CTRL v, CTRL s, CTRL v ?
Is they be counted like this 11 CTRL key + 41 A key = 52 (ctrl a) ? But i see in help file 52 R key
And can _IsPressed() keys can be custom made like CTRL a, CTRL v, CTRL s, CTRL v ?
Is they be counted like this 11 CTRL key + 41 A key = 52 (ctrl a) ? But i see in help file 52 R key
Code:
#include <Misc.au3>
Global $hDLL = DllOpen("user32.dll")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
If _IsPressed(11, $hDLL) Then
Do
ConsoleWrite("test" & @CRLF)
Sleep(800)
Until _IsPressed(11, $hDLL)
EndIf
WEnd
DllClose($hDLL)