Indrid_Cold Posted October 3, 2022 Share Posted October 3, 2022 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! Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted October 3, 2022 Share Posted October 3, 2022 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. 1 Quote Link to comment Share on other sites More sharing options...
Indrid_Cold Posted October 3, 2022 Author Share Posted October 3, 2022 That worked, thank you! 1 Quote Link to comment Share on other sites More sharing options...
Indrid_Cold Posted October 4, 2022 Author Share Posted October 4, 2022 I was just bemoaning the fact that I was going to have to do this 100 times. Then came across the link below. Of course JoeViking already solved that too! 💪 1 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted October 4, 2022 Share Posted October 4, 2022 1 hour ago, Indrid_Cold said: I was just bemoaning the fact that I was going to have to do this 100 times. That was going to be my next suggestion if indeed the above worked. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.