Im trying to make a loop that exits with hotkeys but i cant get them to work at all even after taking example scripts and plugging my own code into them
; Press Esc to terminate script, Pause/Break to "pause"
Global $Paused, $Runner
HotKeySet("{F2}", "TogglePause")
HotKeySet("{F1}", "Terminate")
MsgBox(0,"Vivace Training Bot1","Author: aj1" & @CRLF &
"Version: v1" & @CRLF & @CRLF & "Press OK to begin, press Left
Shift to exit")
;;;; Body of program would go here ;;;;
While 1
Sleep(1000)
Send("1")
Sleep(3000)
Send("{ESC}")
Sleep(9000)
WEnd
;;;;;;;;
Func TogglePause()
$Paused = Not $Paused
While $Paused
Sleep(100)
ToolTip('Script is "Paused"', 0, 0)
WEnd
ToolTip("")
EndFunc ;==>TogglePause
Func Terminate()
Exit 0
EndFunc ;==>Terminate
can anyone give me advice on this?