BuckoA51 Posted April 5, 2016 Author Share Posted April 5, 2016 So I'm trying to use the "Additional apps" feature to launch Xpadder before my PC game starts, then run Xpadder again once the game closes to clear the custom bindings once the game exits. However, when I try to do this, Xpadder starts, loads my custom key bindings, then immediately starts again and wipes them out. Why isn't Launch Box waiting for me to quit my game before running the "After" command? Is this a bug or am I missing something. Quote Link to comment Share on other sites More sharing options...
SentaiBrad Posted April 5, 2016 Share Posted April 5, 2016 Did you check the wait for exit box? Quote Link to comment Share on other sites More sharing options...
spycat Posted April 5, 2016 Share Posted April 5, 2016 You need to make 2 additional apps. One to start Xpadder before the game and the second to close Xpadder once you quit the game. See attached images for examples. Quote Link to comment Share on other sites More sharing options...
SentaiBrad Posted April 5, 2016 Share Posted April 5, 2016 scree said You need to make 2 additional apps. One to start Xpadder before the game and the second to close Xpadder once you quit the game. See attached images for examples. Even more specific, thank you Scree. Quote Link to comment Share on other sites More sharing options...
BuckoA51 Posted April 5, 2016 Author Share Posted April 5, 2016 scree said You need to make 2 additional apps. One to start Xpadder before the game and the second to close Xpadder once you quit the game. See attached images for examples. That's exactly how I have it set up, but Launchbox does not wait for my game to exit Quote Link to comment Share on other sites More sharing options...
spycat Posted April 6, 2016 Share Posted April 6, 2016 I use those additional app settings to play many games including PC games and all work ok. As far as I'm aware other members use the same additional app structure for Xpadder. I did have issues with some PC games that could read my controller and would do their own thing. So when Xpadder said Shoot the game might also tell the character to jump. Disabling the game's own controller support and just leaving keyboard input support solved those issues for me. Quote Link to comment Share on other sites More sharing options...
BuckoA51 Posted April 6, 2016 Author Share Posted April 6, 2016 The game I'm trying to get it working with is Trackmania 2. I guess LaunchBox just thinks the game has exited when it hasn't? I know that can happen for instance if a game calls another executable or suchlike, or maybe it doesn't work for Steam games at all? Quote Link to comment Share on other sites More sharing options...
SentaiBrad Posted April 6, 2016 Share Posted April 6, 2016 Unless someone can confirm they do this with Steam games, that is actually probably it. We don't use the exe's to launch games but rather an API call that is consistent 100% and why you see uninstalled games too. Quote Link to comment Share on other sites More sharing options...
BuckoA51 Posted April 6, 2016 Author Share Posted April 6, 2016 Ok thanks for the clarification. I'll see if I can get Xpadders autoprofile thing working instead. Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted April 6, 2016 Share Posted April 6, 2016 Just saw this and confirming that it is correct. Unfortunately with Steam we have no way to know when a game exits. Quote Link to comment Share on other sites More sharing options...
Wutex Posted September 3, 2016 Share Posted September 3, 2016 I have the same problem when running Amiga-games with FS-Uae. The application set to "run after" is run immediately after the Emulator is started. Quote Link to comment Share on other sites More sharing options...
Jason Carr Posted September 3, 2016 Share Posted September 3, 2016 Thanks @Wutex. Unfortunately the method we're using just waits for the initial process to exit, which isn't fail-proof. Sometimes emulators will launch one process from another, which is very difficult to detect. I don't have an immediate way to solve this problem, but I'd appreciate if you could report it using Issues/Requests in the header. Quote Link to comment Share on other sites More sharing options...
lazaro Posted August 23, 2017 Share Posted August 23, 2017 Sorry for the necrobump - wanted to add for relevancy and it doesn't make sense to start a new thread. I just had the same problem with Anodyne running as a Steam game and resolved it. As Jason mentioned, there's probably no way to reliably read an exit code for a game running from a Steam ID. You can, however, edit the game profile in Launchbox to use the actual executable under <Program Files (x86)>\Steam\steamapps\common\<Your Game>\<Game.exe> -- "Run After" applications should then work as expected. Not sure if this will work with all games, but it works with Anodyne at least. Quote Link to comment Share on other sites More sharing options...
ckp Posted August 25, 2017 Share Posted August 25, 2017 On 4/6/2016 at 1:35 PM, Jason Carr said: Just saw this and confirming that it is correct. Unfortunately with Steam we have no way to know when a game exits. I wonder if an option to run after controller automation's exit key combo kicks in, could solve this for things like Steam games and others? Quote Link to comment Share on other sites More sharing options...
JamesBond@ge Posted December 8, 2017 Share Posted December 8, 2017 (edited) Sorry for the double necrobump. I have a similar problem with Sega Rally 2 for the PC. I launch it with a batch file that Kills Fraps (because I have it running from PC startup and the FPS counter looks ugly and massive at 800x600 resolution), mounts CD2 for the music, and launches the game. That's fine. I then have an 'additional app' which is a batch file for me to manually restart Fraps when I quit Sega Rally 2. That's fine too, just clunky. I try to set it to "run after main application' in the Edit box and the "wait for exit" box is greyed out. Exactly the option I need, but it is FIFTY SHADES OF greyed out :-( That makes me want to cry. And throw my hands up to the sky. I ain't even joking ;-) Edited December 8, 2017 by JamesBond@ge Quote Link to comment Share on other sites More sharing options...
jayjay Posted December 8, 2017 Share Posted December 8, 2017 (edited) The "wait for exit" box will un-grey (?) if you select the "run before" box. I have just been sorting out a load of additional apps. I find that if you want to run an app when game exits. Then selecting just the "run after main application" box works. I would like to know if "run before main application" and the "wait for exit" boxes are checked how does it work. Edited December 8, 2017 by jayjay 1 Quote Link to comment Share on other sites More sharing options...
JamesBond@ge Posted December 8, 2017 Share Posted December 8, 2017 (edited) 17 minutes ago, jayjay said: I would like to know if "run before main application" and the "wait for exit" boxes are checked how does it work. That's what I'm talking about. I need to run a batch file after Sega Rally 2 is exited so that batch file can BOOM, restart Fraps afterwards. The options for additional apps is "run before main application", "run after main application" and a supplementary option to "wait for exit". I need to "run after main application" and "wait for exit" but I can't do that because when I check the "run after main application" box, the "wait for exit" box then greys out. Edited December 8, 2017 by JamesBond@ge Quote Link to comment Share on other sites More sharing options...
jayjay Posted December 8, 2017 Share Posted December 8, 2017 (edited) I have xpadder run "before main application". Then a script to close xpadder "after main application". Wont selecting just the "run after main application" work for you? Iv just been using it and it works for me. The "wait for exit" isn't needed. I have found it confusing. But "run after main application" is basically wait for exit as I read it. But im guessing, not to sure, that if an app uses the "run before" and the "wait for exit" its basically saying... This app will run and then exit before the game starts. Hope that makes sense. "Run after main application" sounds like, run the game, then run the app after game starts. But actually what it does is, runs the game, waits for the game to exit, then runs the app. Edited December 8, 2017 by jayjay 1 Quote Link to comment Share on other sites More sharing options...
jayjay Posted December 8, 2017 Share Posted December 8, 2017 Or you could use a script: #SingleInstance, Force #Persistent SetTitleMatchMode, 2 DetectHiddenWindows, On SetTimer, ProcessCheckTimer, 3000 Return ProcessCheckTimer: Process, Exist, GAME.exe pid1 := ErrorLevel If (!pid1) { Run, path-to-fraps ExitApp } Return Change GAME.exe to sega rally process. Change path-to-fraps... It will check every 3 seconds for sega rally process. When it doesn't find it, it will run fraps then exit. 1 Quote Link to comment Share on other sites More sharing options...
JamesBond@ge Posted December 8, 2017 Share Posted December 8, 2017 (edited) 9 hours ago, jayjay said: Change GAME.exe to sega rally process. Change path-to-fraps... It will check every 3 seconds for sega rally process. When it doesn't find it, it will run fraps then exit. You little beauty! That worked. I just needed to tweak the timing up to 20 seconds to keep the script playing the game. (I've chosen "Launch Before" but I don't think I need to do that now) Your post above this one gave me food for thought. I tried the "Restart Fraps" script with another game "Duck Tales Remastered" that is simple to run and the "run before main application£ option worked. This tells me that because I was running Sega Rally 2 with a "mount ISO and Launch Game" script, Launchbox is thinking the script is the main application and launching the other one prematurely. Something like that. My brains are blown LOL. One of these days I'm gonna get a PS4 and just press the start button lol. Thanks mate! I appreciate your time. Your script with the "check and wait" function worked and LaunchBox is working as it should. I can build on it for other things as well. Edited December 9, 2017 by JamesBond@ge 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.