Guest perryman07 Posted July 11, 2005 Share Posted July 11, 2005 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? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 11, 2005 Moderators Share Posted July 11, 2005 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. Link to comment Share on other sites More sharing options...
DarkNecromancer Posted July 11, 2005 Share Posted July 11, 2005 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 Link to comment Share on other sites More sharing options...
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