Jump to content

how to trigger an event, like exiting, WITHOUT


Recommended Posts

So.. I want to stop running my script when I press a hotkey (lets say f5) WHENEVER I want.. I know how to detect what key is pressed and such BUT since my script has a bunch of loops, I'd have to press f5 when that loop is over, or hold it, so the keystroke can be detected at the right IF statement...

...I was wondering if there was such thing to make a hotkey that no matter where the algorythm is at, it can help me exit the script or redirect it to a different function..

Hope you guys can get what I mean :(

Thanks in advance >_<

Link to comment
Share on other sites

So.. I want to stop running my script when I press a hotkey (lets say f5) WHENEVER I want.. I know how to detect what key is pressed and such BUT since my script has a bunch of loops, I'd have to press f5 when that loop is over, or hold it, so the keystroke can be detected at the right IF statement...

...I was wondering if there was such thing to make a hotkey that no matter where the algorythm is at, it can help me exit the script or redirect it to a different function..

Hope you guys can get what I mean :(

Thanks in advance >_<

Please don't double post, it's worse than bumping before a reasonable time has passed, and it wastes peoples' time who don't realize you have double posted.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

HotKeySet("{F5}", "_QuitApp")

...


Func _QuitApp()
    Exit
EndFunc

omg, I didnt know that function worked like that... I just used _isDigit and if statements... my bad then i suppose, gonna try it out.. im still new at this :S

Thanks for your reply! >_<

Please don't double post, it's worse than bumping before a reasonable time has passed, and it wastes peoples' time who don't realize you have double posted.

uhm if you mean the one at the GUI forum, yah, i didnt intend to post this there, thats why i edited that thread about 2 mins later after posting it.. i would have deleted it if i knew how ;x
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...