simonwar Posted July 22, 2007 Posted July 22, 2007 Apologies for this seemingly easy question.... .....but I just got into hell of a mess with a Do....While loop, nearly lost lots of work basically because i couldn't stop the script. Hit every key on the board, Esc, Ctrl-Esc, Ctrl-Alt-Del, Alt-F4, you name it..... but nothing.... the scipt, tireless to the end, continued.
poisonkiller Posted July 22, 2007 Posted July 22, 2007 (edited) You can pause/stop your script from tray and you should add Sleep function to Do...While loops to avoid overdrive. Edited July 22, 2007 by poisonkiller
simonwar Posted July 22, 2007 Author Posted July 22, 2007 pause/stop your script from trayCan you elaborate... what is tray, couldn't do anything with anything apart from shutdown.Sleep function to Do...While loops to avoid overdrive.Again, forgive my lack of experience, not sure how to do this ?Thanks, Simon.P.S. I am using While 1 --------- WEnd as the loop code
loki1982 Posted July 23, 2007 Posted July 23, 2007 Can you elaborate... what is tray, couldn't do anything with anything apart from shutdown.Again, forgive my lack of experience, not sure how to do this ?Thanks, Simon.P.S. I am using While 1 --------- WEnd as the loop codeDown in the bottom right portion of your screen there is a "System Tray" area that has your clock, and depending on whats running, other icons related to whats running. When an autoit script runs there is an icon down in the tray area you you can right click and either pause the script, or close it.And for sleep you use sleep(<delay>) where <delay> is how many milliseconds you want the script to sleep. 1000 = 1 second.
mikehunt114 Posted July 23, 2007 Posted July 23, 2007 If you're executing a never-ending loop, it's always a good idea to have a backdoor exit. I prefer to set a hotkey at the top of my script, and call and an exiting function. HotKeySet("{ESC}", "Terminate") ;main portion of script here Func Terminate() Exit 0 EndFunc IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
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