zanthal Posted September 28, 2011 Share 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 Link to comment Share on other sites More sharing options...
JohnOne Posted September 28, 2011 Share 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. Link to comment Share on other sites More sharing options...
zanthal Posted September 28, 2011 Author Share Posted September 28, 2011 Thanks for the reply but I don't know what you mean. Link to comment Share on other sites More sharing options...
JohnOne Posted September 28, 2011 Share 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. Link to comment Share on other sites More sharing options...
zanthal Posted September 28, 2011 Author Share Posted September 28, 2011 I must have been blinded, thanks for the help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now