cheguewara Posted March 4, 2022 Share Posted March 4, 2022 (edited) Hey Guys, I have a little Problem with launching Pinball FX3 with additional Application. I wrote 2 batch files, one for launching with the start of Pinball FX3: [code] @echo off cd "F:\Emulators\DirectOutput" start DOFLinx.exe start "" "F:\Programs\JoyToKey\JoyToKey.exe" cd "F:\Emulators\vPinball\VisualPinball\VPinMAME" start dmdext.exe mirror --source=pinballfx3 --no-virtual --virtual-position=7680 256 1024 512 [/code] and one to kill all the launched programs: [code] @echo off taskkill.exe /F /IM JoyToKey.exe" taskkill.exe /F /IM dmdext.exe" taskkill.exe /F /IM doflinx.exe" [/code] But the Problem is, (because the emulator is set to steam.exe) launchbox thinks steam is the main application, so when steam client is not in the background and i launch directly from launchbox into a table. the one for starting the additional apps works (besides doflinx complaining not finding the ini file). But lets say i quit a table and steam is now in the background. when i launch a table again, the batch file will not run. when quitting out of steam, the batch file works. also, the batch file for killing all tasks is not loading (outside of launchbox, just double clicking on bat file works). is there a better, more elegant way to do this? Edited March 4, 2022 by cheguewara Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted March 5, 2022 Share Posted March 5, 2022 The issue is (I'm pretty sure) when you launch a Steam game, it runs Steam.exe -applaunch xxxxx where xxxxx is the Steam ID # for that game (aka the games Application Path as setup in LaunchBox). Steam then does whatever Steam does to load/run/launch the game, and the 'original' Steam.exe closes/exits as the game [continues to] run. So when LaunchBox sees the "original Steam.exe" exit, it launches the "Run after game exits" Additional App. To 'get around this' you can create an AutoHotkey script (or batch file) and add that as an Emulator. The script would execute the Run Before stuff, launch Steam to load the game, then keep an eye on the Registry (which will hold the Steam ID # while it's running). Once "that" Steam ID # is no longer in the Registry (game has now exited), it will execute the Run After stuff. Here's an example: 1 Quote Link to comment Share on other sites More sharing options...
cheguewara Posted March 5, 2022 Author Share Posted March 5, 2022 Thanks for pointing me in the right direction! I'll look into this, but looks good on first glance 1 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.