Jump to content
LaunchBox Community Forums

AutoHotKey wait for executable to close.


thedevilsjester

Recommended Posts

On 4/26/2018 at 1:25 AM, ckp said:

ok. same idea. you just run the process kill (or whatever task you want to do) after you exit the game with controller automation.

so here is an example of how to close xpadder when exiting the game with your controller:

you just run what you want before the the emulator exit (process, close, {{{startupexe}}}) line runs:

 

$Esc::
{
    Run, C:\Xpadder\Xpadder.exe /C
    Process, Close, {{{StartupEXE}}}
}
 

Hey @ckp and gang; do you know of a similar AHK content but for JoyToKey? I need to launch JTK with MAME, but then fully kill it when exiting MAME and going back to BB (cannot leave it active while in BB).
Any help will be highly appreciated!

Link to comment
Share on other sites

29 minutes ago, Kondorito said:

do you know of a similar AHK content but for JoyToKey? I need to launch JTK with MAME, but then fully kill it when exiting MAME and going back to BB (cannot leave it active while in BB).

i am not familiar with jtk, but if you want to kill it when exiting games, just put a line to kill the process before the line that closes startupexe. So, you could use Process, Close or something like taskkill.exe. 

Link to comment
Share on other sites

21 minutes ago, ckp said:

i am not familiar with jtk, but if you want to kill it when exiting games, just put a line to kill the process before the line that closes startupexe. So, you could use Process, Close or something like taskkill.exe. 

Thanks. How would the AHK lines be for launching C:\JoyToKey\joytokey.exe, and then taskkilling it? (Sorry as I am not familiar with AHK).

 

Link to comment
Share on other sites

Run, C:\JoyToKey\joytokey.exe

$Esc::
{
    Process, Close, joytokey.exe
    Process, Close, {{{StartupEXE}}}
}

 

Could try that. If process close doesn't kill jtk, you could try:  Run, taskkill.exe (with the full path) /F /IM joytokey.exe

Edited by ckp
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...