Hi,
I've been using autoit for quite some years now and have mainly been lurking around the forums whenever I have had a problem. I've managed to get by through trial and error and I don't actually know very much about the program. I was wondering if I could get some help with my script.
My question is the following:
Is there a way to set a hotkey to pause my script but when I restart it, it begins from the beginning again rather than starting up where it paused?
For example.
Currently my script does.. ... pause at "c" >> unpause = starts at "d"
However I want it to do... ... pause at "c" >> unpause = restarts at "a"
Here is what I am working with
AutoIt
;my script template #requireadmin opt("SendKeyDownDelay", 200) $count = 0 Global $UnPaused HotKeySet("`", "TogglePause") HotKeySet("{ESC}", "Terminate") ;-------------------- While 1 Sleep(10) ToolTip("Script is Paused",0,0) WEnd ;-------------------- Func TogglePause() $UnPaused = NOT $UnPaused While $UnPaused ;---script goes here-- Send("a") Send("b") Send("c") Send("d") ;-------------------- WEnd EndFunc ;-------------------- Func Terminate() Exit 0 EndFunc
Any help is greatly appreciated!
- Alex