Luxlucis Posted April 24, 2015 Share Posted April 24, 2015 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? Link to comment Share on other sites More sharing options...
JohnOne Posted April 24, 2015 Share Posted April 24, 2015 Works perfectly fine. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Luxlucis Posted April 24, 2015 Author Share Posted April 24, 2015 Maybe it could be because im using it for a game? Link to comment Share on other sites More sharing options...
meows Posted April 25, 2015 Share Posted April 25, 2015 At top of script below includes HotKeySet("{ESC}", "Terminate") at bottom of script Func Terminate() Exit 0 EndFunc the end Link to comment Share on other sites More sharing options...
Developers Jos Posted April 25, 2015 Developers Share Posted April 25, 2015 Maybe it could be because im using it for a game? Please read our forum rules first before continuing posting in our forums. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts