Jump to content
LaunchBox Community Forums

How to get LaunchBox to close an .EXE it didn't launch?


Indrid_Cold

Recommended Posts

I need help getting LaunchBox to close an .EXE it did not launch.
To be specific, I want LaunchBox to close PhoenixEmuProject.exe when I press the ESC key even though LB did not launch the Phoenix emu.
I have LaunchBox launching LBPhoenixLauncher.exe (LB gives that .EXE the full path to the .IMG).
LBPhoenixLauncher.exe launches PhoenixEmuProject.exe ,passing along the full path to the .IMG and then makes the EMU full screen.
    I got LBPhoenixLauncher.exe from here:
       https://forums.launchbox-app.com/topic/61999-another-phoenix-launcher-without-the-preloading-games-requirement-lbphoenixlauncher/

But now I am hoping to close PhoenixEmuProject.exe by using the ESC key instead of having to use CTRL-Q (the built in shortcut within the emu and the emu does not provide an option for setting up a different exit hot key)
Nothing I put in the Running AutoHotkey Script will ever be effective since what LB called (LBPhoenixLauncher.exe) is already closed (i even get a quick flash of the exit screen right before the Phoenix EMU launches the .IMG).
Before I realized that LB is no longer using the Running AutoHotkey Script (since what it launched has closed), i tried all kinds of things like below.

$Esc::
{
    WinClose, ahk_exe PhoenixEmuProject.exe
}


But like I said, NOTHING in Running AutoHotkey Script will ever be effective because as far as LB is concerned, the .EXE it launched (LBPhoenixLauncher.exe) already exited (its not running).
Maybe LB can launch 2 .EXEs (LBPhoenixLauncher.exe and something else like Notepad minimized) and then the Running Script will still be effective since that 2nd EXE is still running? 

Among the other Phoenix emu launchers (some of which specify they included the ESC = exit hotkey ) I want to use LBPhoenixLauncher.exe because it prepopulates the 3DO meta data for you, without having to do all the 3DO games before hand within PhoenixEmuProject.exe
If nothing else I can always fall back onto using one of the other Phoenix emu launchers but I am hoping to keep my existing setup if possible.

Any help is appreciated, thanks! 
 

Link to comment
Share on other sites

Try this:

  • Create a text file that contains the following, save it, and rename it to a .ahk file extension.  Something like "ClosePhoenixEmu.ahk"  Be sure it doesn't get saved with a .txt on the end. Like "ClosePhoenixEmu.ahk.txt"
$Esc::
WinClose, ahk_exe PhoenixEmuProject.exe
ExitApp
  • Edit one of your games, go to Additional Apps and click Add Application
  • For the Application Path, Browse to ..LaunchBox\ThirdParty\AutoHotkey\ and select AutoHotkey.exe
  • In the Application Command-Line Parameters field, enter the full path to where you saved the file you created, in "quotes".
  • Check the box Automatically Run Before Main Application.
  • Click OK
  • Play the game and see if it works.

image.thumb.png.485b10f97bc0e762241e4cec92eb77aa.png

 

  • 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...