Jump to content
LaunchBox Community Forums

Pinball FX3 and additional Apps


cheguewara

Recommended Posts

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 by cheguewara
Link to comment
Share on other sites

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: 

 

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