Sign in to follow this  
Followers 0
Guest perryman07

Coding an Abort button

3 posts in this topic

I have a simple GUI with only two buttons, a GO and an Exit. But sometimes my program will mess up and click somewhere where it shouldn't or something isn't copied and pasted in the right place for some reason, and the chain of events that follow are just ugly and sometimes harmful to files and program settings. Right now all I can do is just Ctrl+Alt+Delete and terminate the program when it starts acting up. I'm wondering if there is a way to create a shortcut key or just another button on my GUI that would abort or exit out of the Case that is currently running, so I can minimize the damage done when my program goes crazy. Is there a way to code in something that constantly checks to see if a button has been hit and if it does then it will exit the Case loop and return main Select loop?

Share this post


Link to post
Share on other sites



I'm wondering if there is a way to create a shortcut key or just another button on my GUI that would abort or exit out of the Case that is currently running, so I can minimize the damage done when my program goes crazy.

Have you looked at "ProcessClose" in the help file?

Is there a way to code in something that constantly checks to see if a button has been hit and if it does then it will exit the Case loop and return main Select loop?

Check out _IsPressed in the "Search" function of the forum. This may help you.

Hope this helps.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

why not?

HotKeySet ("{f1}", "EXIT")

your stuff here

func EXIT()
    exit
EndFunc
i dont know maybe im missing something but the hotkey interups the next line of code and you can hotkey an 'o crap' key :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0