Run script on program startup, and then turn off script on program shutdown

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
petrovskyz
Posts: 1
Joined: 17 May 2018, 02:47

Run script on program startup, and then turn off script on program shutdown

17 May 2018, 02:51

Hi folks, I'm working on this script that I use to remap gamepad controls for a photo editing software. Now I've made the remapping of the controls as I need them, the only thing left is to somehow make the script load when I fire up the software, and then make the script unload when the program is shut down. Any ideas on how to do this?

Thanks in advance!
RickC
Posts: 299
Joined: 27 Oct 2013, 08:32

Re: Run script on program startup, and then turn off script on program shutdown

17 May 2018, 04:23

Do it the other way round, i.e. have the script run the photo editing software then use process, exist to check for when the photo editing software is no longer running to close the script.

Hope this helps...
MaxAstro
Posts: 557
Joined: 05 Oct 2016, 13:00

Re: Run script on program startup, and then turn off script on program shutdown

17 May 2018, 09:04

Alternatively, you could use if statements and #IfWinExist statements to make the script only do anything when the software is running, and then the script can just run all the time.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Holarctic, ishida20, jameswrightesq, Lem2001 and 396 guests