close script open another Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Hardwired

close script open another  Topic is solved

27 Apr 2015, 21:50

Hello,

I have two different scripts I use alternatingly. My keypad has two hardwired hotkeys that can trigger my scripts. So, all i have to do is Exitapp my script, and press the hardwired hotkey to open my other script. This allows me to switch rapidly between the two scripts.

Since once I ExitApp my script, my keypad is no longer running any script, and I can only use the hardwired hotkey to launch a script.

My question is, Is there any way to ExitApp a script and launch another script AT THE SAME TIME. This way, I don't need to rely on the hardwired hotkeys to launch a script.

Thanks.

Dan
User avatar
Blackholyman
Posts: 1293
Joined: 29 Sep 2013, 22:57
Location: Denmark
Contact:

Re: close script open another

28 Apr 2015, 00:34

The OnExit label maybe!

Any code under that label will run when you exit your script... But do read the doc's about it to make sure you use it the right way!
Also check out:
Courses on AutoHotkey

My Autohotkey Blog
:dance:
Noesis
Posts: 301
Joined: 26 Apr 2014, 07:57

Re: close script open another

28 Apr 2015, 01:00

It could be done with OnExit() but like Blackholyman says you'd need to read the docs and check the exit reason before launching the script so it doesn't launch it when the script is exited due to reasons other then the hotkey is pressed. Another solution would be to simply run your script immediately prior to the exitapp command for that hotkey.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: dipahk and 241 guests