Jump to content

Stopping execution


Recommended Posts

I'm running my script from the sciTE editor - the script contains mouse movements. How do I stop execution when it goes wrong? I've tried Ctrl+Break but that doesn't work very often, and clicking on the icon in the taskbar can be hit and miss because of the script mouse movements taking control.

Am I missing something that someone could advise me on please?

[font="Comic Sans MS"]"I'm not usually a praying man, but if you are up there, please save me Superman!" (Homer J. Simpson)[/font]
Link to comment
Share on other sites

Try setting a hotkey.

eg

Global $pause = False

HotKeySet("{PAUSE}","_pause")

;your
;code
;here

Func _pause()
    $pause = Not $pause
    If $pause Then
        While 1 
            Sleep(100)
        Wend
    EndIf
EndFunc

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

Yep - the hotkey solution works perfectly - thanks JohnOne

[font="Comic Sans MS"]"I'm not usually a praying man, but if you are up there, please save me Superman!" (Homer J. Simpson)[/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...