zanthal 0 Posted September 28, 2011 I'm trying to get a very simple endlessly looping action going that I can toggle paused and toggle unpaused, and terminate altogether, using hotkeys. As I barely know what I'm doing I started with the snippet example in the help file and this is my script below: Global $Paused HotKeySet("{^z}", "TogglePause") HotKeySet("{^x}", "Terminate") ;;;; Body of program would go here ;;;; While 1 Send ("^8") Sleep (10000) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) WEnd EndFunc Func Terminate() Exit 0 EndFunc As this is, the loop starts when I execute the script, and I can use CTRL-z to pause the script, but it doesn't unpause, and it's pretty much beyond me as to why. Thanks for any pointers you might have Share this post Link to post Share on other sites
JohnOne 1,603 Posted September 28, 2011 HotKeySet("^z", "TogglePause") ; here HotKeySet("^x", "Terminate") ;and here AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
zanthal 0 Posted September 28, 2011 Thanks for the reply but I don't know what you mean. Share this post Link to post Share on other sites
JohnOne 1,603 Posted September 28, 2011 Look at the differences between them. then change what you have for those above. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
zanthal 0 Posted September 28, 2011 I must have been blinded, thanks for the help. Share this post Link to post Share on other sites