Kmetz7547 Posted August 15, 2023 Share Posted August 15, 2023 (edited) Ok so Ive been trying to find the easiest solution to this. Im using the additional apps feature in LB to run my sinden lightgun software when I boot a Singe 2 game (.exe). Along with others, Iv noticed that running a .bat file to close the lightgun software after game closes dont work.Ive read this is normal for games that arent running from an emulator, yet exe. So my goal here is how do I get my sinden lightgun software to close when an exe game closes? Any more help would be great. Thanks Edited August 15, 2023 by Kmetz7547 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted August 15, 2023 Share Posted August 15, 2023 I've never personally worked with either of those, but looking at the Sinden Wiki page for Singe 2, under "If you're using a frontend like LaunchBox", they mention creating a batch file to launch the games. As an option.... Their example batch file shows using "Singe-v2.00-Windows-x86_64.exe" and a bunch of parameters that point to the game to load. Their example for Mad Dog McCree looks like: Singe-v2.00-Windows-x86_64.exe -k -w -z -d data -v Maddog_McCree_Singe_2\Video\maddog.mp4 Maddog_McCree_Singe_2\Script\maddogiDsinge If you were to have a batch file to load the game (as shown above), you could combine your Additional apps into it. Something along the lines of: Start "" "D:\path\to\sinden\Load Sinden software.exe" -whatEverRequiredParameter start "" /w "Singe-v2.00-Windows-x86_64.exe" -k -w -z -d data -v Maddog_McCree_Singe_2\Video\maddog.mp4 Maddog_McCree_Singe_2\Script\maddogiDsinge whatEverCommandUsedToExitSinden.exe The /w will wait until Singe----.exe exits before executing the next line (close the lightgun software). But you mentioned your launching a game.exe. Is the exe the actual game? Or is it, itself a launcher of sorts. That is, you launch game.exe and that in turn starts Singe--.exe to load the game. If that's the case, you might need to get a little more creative and possibly use an AHK script to look for the games window (that eventually get loaded) and wait for that window to close. Then close the Sinden software. If that's not the case, on your 'close Sinden' additional app, make sure you have 'run after main app' checked. Quote Link to comment Share on other sites More sharing options...
Kmetz7547 Posted August 15, 2023 Author Share Posted August 15, 2023 Ok I apologize, Im booting the Bat file which has this script inside: Start Singe.exe -k -z -w -d Maddog_HD/Index -v Maddog_HD/Video/maddog.mp4 Maddog_HD/Script/maddog.singe The game does not start the sinden software so I added the path for that in the additional apps section of LB. So now when I boot the Singe game, my sinden software starts up as well in the background. Yay.. But my problem is gettig the sinden software (which is an exe, to close when I close the game. I attempted to make a bat file and put that in the additional apps section as well while ticking to start when game closes, but it dont work. It closes it when the game boots. Does that help at all with what my issue is? Im new at this so I know it can sound confusing maybe. Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted August 15, 2023 Share Posted August 15, 2023 1 hour ago, Kmetz7547 said: I attempted to make a bat file and put that in the additional apps section as well while ticking to start when game closes, but it dont work. It closes it when the game boots. That info helps. What's happening is: Your Additional App that's set to load Sinden Before the game launches, works. Then, "the game" launches. In this case, "the game" (as LaunchBox sees it) is the batch file. The batch file starts the game. Its job is done, so it exits/closes. LaunchBox sees that "the game" (the batch file that it launched) has exited, so in its eyes the game has exited. So it then runs the other Additional App (close Sinden). Just as it was instructed to do. So, keep your both original Additional Apps as they were. Then, to keep your batch file ("the game") 'alive' while the game is running, add "" /w to your line of code in the games' batch file. Start "" /w Singe.exe -k -z -w -d Maddog_HD/Index -v Maddog_HD/Video/maddog.mp4 Maddog_HD/Script/maddog.singe Now, LaunchBox will see "the game" as still running until you close Singe. Now that it (hopefully) works as you intended, you may notice that the Command Prompt window (the batch file window we told to wait around) is up and showing. It may be behind the actual game, and you may not see it. Or it may stick out like a sore thumb. The fix: Create a shortcut to that batch file (right click it and select Create Shortcut). Now right click the shortcut and select Properties. Change Run to Minimized. Click OK. And finally, edit the game in LaunchBox and in the Launching section, point to the new shortcut. You could still eliminate the Additional Apps altogether by adding their code before and after, respectively, to the line shown above. Similarly (or [almost] exactly) to my previous post. Then you'd just have "the game's" batch file. You'd still want to do the shortcut thing mentioned. Quote Link to comment Share on other sites More sharing options...
Kmetz7547 Posted August 15, 2023 Author Share Posted August 15, 2023 OMG! Flawless! Worked Great Man. Thank you So Much!!!! 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.