Jump to content
LaunchBox Community Forums

[Request] Option to Close the 'Additional App' that was Set to Run Before Game


Jason Carr

Recommended Posts

I use the 'additional app' to run helper programs that allows me to run games at odd resolutions (Widescreen Fixer / Flawless Widescreen). This feature is awesome, as I can now launch games that require these helper programs with a single double click. The only issue I run into is when I close one game and open another (or the same game again). The helper program stayed open from the first session, and now either has two instances running, or prompt to close the prior instance. If it would be possible to have either an option to kill the 'addition app' as the game exits, or to automatically not open it again if it is still running, that would be very helpful. Laugh Thanks regardless!
Link to comment
Share on other sites

Do either of these work with emulators or just individual games I am having some issues getting Nestopia and Kega to run in fullscreen with out black lines on the side I'm looking for some way to get them to stretch full screen Nestopia does it while maximized but that isn't the same as full screen.
Link to comment
Share on other sites

Similarly to Ruthalas's situation, I'd like to have launchbox automatically close steam after closing a steam game. Theres no reason to have the steam launcher running alongside launchbox longer than it is needed. Can launchbox run a command (like taskkill /IM steam.exe /t /f) after a game is closed? Does anyone know if steam has a supported way to close it from the command line without forcibly terminating it?
Link to comment
Share on other sites

scree said Hi Ruthalas. If these screen helper apps support a command line parameter to close themselves, then you could add this as a 2nd additional app to automatically run after the main app (the game) has finished.
This is an excellent idea. Unfortunately I have looked and it seems that they do not have command line parameters I can utilize. I am currently trying to run a batch script with the command s0m notes. 'taskkill /IM Flawless Widescreen.exe /t /f' I am having trouble getting it to run after the game though, and it generates a UAC prompt anyway, which isn't ideal.
DOS76 said Do either of these work with emulators or just individual games I am having some issues getting Nestopia and Kega to run in fullscreen with out black lines on the side I'm looking for some way to get them to stretch full screen Nestopia does it while maximized but that isn't the same as full screen.
I suspect they won't work for that DOS76, but you can check out the websites for each where they have a list of games they support. (Plugins/profiles must be generated for each game individually.)
s0m said Can launchbox run a command (like taskkill /IM steam.exe /t /f) after a game is closed? Does anyone know if steam has a supported way to close it from the command line without forcibly terminating it?
I tried this- you can run a batch script (as your 'additional app') with that command. You may need make a shortcut to it to run it with Admin privileges. It works ok, but generates a UAC prompt.
Link to comment
Share on other sites

Ruthalas said I am currently trying to run a batch script with the command s0m notes. 'taskkill /IM Flawless Widescreen.exe /t /f' I am having trouble getting it to run after the game though, and it generates a UAC prompt anyway, which isn't ideal.
Try putting the process name in quotes as Taskkill /IM "Flawless Widescreen.exe" /t /f . Command line doesn't like spaces within parameters. You also probably don't need the /t (kills child processes) or /f (forced termination) either for that program, but they don't hurt. If anyone else is interested, I also found that running steam:"steam.exe -shutdown" from the command line, or just steam.exe -shutdown from the steam install path is a safer, supported way of closing steam. Can't seem to get the "Automatically run after main application" feature to work though.
Link to comment
Share on other sites

s0m said Try putting the process name in quotes as Taskkill /IM "Flawless Widescreen.exe" /t /f . Command line doesn't like spaces within parameters. You also probably don't need the /t (kills child processes) or /f (forced termination) either for that program, but they don't hurt.
The process name doesn't contain a space, but I'll give that a whirl. Thank you!
Link to comment
Share on other sites

  • 4 years later...
6 hours ago, damageinc86 said:

I'd like to be able to close joy2key after the game is closed.  It just sits there after the game closes.  I can't figure out how to close joy2key after i'm done with the game.

You can compile an AHK script to close joy2key when the game closes. Then set it as an additional app to be run after main application. 

Link to comment
Share on other sites

Place this bat file anywhere you want. I keep it in the AHK folder in Launchbox. Then edit the game and go to the additional apps tab. Choose Add new application. In Application Name filed call it what you want. In application path link to the .bat file where you stored it.  Then make sure to tick the box to run after main application.  I use this for some windows games so if this is for an emulator I am not sure if you need to tick an other boxes.

If you right click the bat file and edit with notepad or notepad++ you will see it is just a command to close Joy2Key.exe.

 

JoyToKeyClose.bat

  • Like 1
Link to comment
Share on other sites

  • 6 months later...
On 10/14/2019 at 7:38 AM, Retro808 said:

Place this bat file anywhere you want. I keep it in the AHK folder in Launchbox. Then edit the game and go to the additional apps tab. Choose Add new application. In Application Name filed call it what you want. In application path link to the .bat file where you stored it.  Then make sure to tick the box to run after main application.  I use this for some windows games so if this is for an emulator I am not sure if you need to tick an other boxes.

If you right click the bat file and edit with notepad or notepad++ you will see it is just a command to close Joy2Key.exe.

 

I am trying to do this same exact thing with joytokey, and when trying this method, it launches joytokey then immediately kills it during the steam game that is running.  Any idea how to get it to only kill it once the game closes?  I have the box checked for run after main application.  thanks.

On 10/14/2019 at 7:38 AM, Retro808 said:

 

Link to comment
Share on other sites

  • 2 months later...

This discussion concerns what I would like to accomplish. Browsing through this though, I get a bit lost.

I have follewed previous tutorials to set up a game's Instruction Manual to run as an added application. I can then easily switch from playing the Game (main application) to viewing the Manual (added application) by using the Alt+Tab hotkey combination. 

What I would like is for the Manual (added app) to automatically close when I close the Game (main app).

Is this possible? If so, How? 

Thanks

Link to comment
Share on other sites

55 minutes ago, SpencerBox said:

This discussion concerns what I would like to accomplish. Browsing through this though, I get a bit lost.

I have follewed previous tutorials to set up a game's Instruction Manual to run as an added application. I can then easily switch from playing the Game (main application) to viewing the Manual (added application) by using the Alt+Tab hotkey combination. 

What I would like is for the Manual (added app) to automatically close when I close the Game (main app).

Is this possible? If so, How? 

Thanks

What format is the game manual (what program is loading the file)? If it is a pdf file as long as you have it in the platform's \Launchbox\Manual folder the LB/BB Pause Menu will show the manual without need to have it as an addition app.

Otherwise the JoytoKeyClose.bat file attached in earlier posts should work, just change the .exe to whatever is opening the game's manual and set the bat file to run at close.

Link to comment
Share on other sites

1 hour ago, Retro808 said:

What format is the game manual (what program is loading the file)? If it is a pdf file as long as you have it in the platform's \Launchbox\Manual folder the LB/BB Pause Menu will show the manual without need to have it as an addition app.

Otherwise the JoytoKeyClose.bat file attached in earlier posts should work, just change the .exe to whatever is opening the game's manual and set the bat file to run at close.

Thanks for the quick response! 

I got it to work. 

Appreciate it!

Best,

 

 

Link to comment
Share on other sites

  • 10 months later...
  • 1 month later...
  • 2 years later...
On 10/14/2019 at 4:38 PM, Retro808 said:

Place this bat file anywhere you want. I keep it in the AHK folder in Launchbox. Then edit the game and go to the additional apps tab. Choose Add new application. In Application Name filed call it what you want. In application path link to the .bat file where you stored it.  Then make sure to tick the box to run after main application.  I use this for some windows games so if this is for an emulator I am not sure if you need to tick an other boxes.

If you right click the bat file and edit with notepad or notepad++ you will see it is just a command to close Joy2Key.exe.

 

JoyToKeyClose.bat 28 B · 148 downloads

Thanks Retro808 this bat helped me so so much closing x360ce with windows games.

Edited by jackotz91
Link to comment
Share on other sites

  • 7 months later...
On 10/14/2019 at 9:38 AM, Retro808 said:

Place this bat file anywhere you want. I keep it in the AHK folder in Launchbox. Then edit the game and go to the additional apps tab. Choose Add new application. In Application Name filed call it what you want. In application path link to the .bat file where you stored it.  Then make sure to tick the box to run after main application.  I use this for some windows games so if this is for an emulator I am not sure if you need to tick an other boxes.

If you right click the bat file and edit with notepad or notepad++ you will see it is just a command to close Joy2Key.exe.

 

JoyToKeyClose.bat 28 B · 157 downloads

I was looking for how to close Lossless scaling automatically for a long time and your method worked perfectly, thank you very much!
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...