Jump to content

Stopping a 'Running' script ...


Recommended Posts

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. :whistle:

Link to comment
Share on other sites

pause/stop your script from tray

Can 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

Link to comment
Share on other sites

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 code

Down 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.

Link to comment
Share on other sites

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]
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...