Jump to content
LaunchBox Community Forums

(Bulk) Add Additional Applications


Recommended Posts

(Bulk) Add Additional Applications

View File

(Bulk) Add Additional Applications    A.K.A.    (Bulk) Add Run Before/After Main Application
 

The intent of this plugin to add the same Additional Application to more than one game, all at one time.  More specifically, it is to add an Additional Application you want to run Before and/or After the selected games.

*Works with LaunchBox versions 10.14 and newer.*

Setup:

  • Download and extract "Bulk Run Before-After.dll" from the zip file and place it in your Plugins subfolder of LaunchBox.
  • Right click the dll file, select Properties, and click "Unblock" (if it's there) and click OK.

1705616419_Unblockdll.jpg.585eeb1aaf20ab36b92b33ac599d3946.jpg

Using the plugin:

  • Select more than one game (or all of them) in your Platform.
  • Right click on one of the selected games and select "Bulk Run Before/After Main Application".
  • Fill in the Application Name, Path to the program, any necessary Command Line Parameters and then check the appropriate box if you want it to run Before or After (or both or none) the Main Application.  Click OK

You should probably test this on only 2 or 3 games first BEFORE you decide to do your entire Platform.  There is no [bulk] undo (See Additional Notes).

 

before-wait.thumb.jpg.5203bad45010beea12d905cfd35a3f89.jpg     after-wait.thumb.jpg.e39bd3d7036218b383c8812552485f4c.jpg

Additional Notes:

Once you click "OK", the Additional Application is added to each game you had selected.  There is no Bulk Edit or Bulk Remove**Additional Application(s). (at least by me)

It does require that you give it an Application Name and an Application Path. 

It will verify that your Application Path points to an existing file but it will not check if there's an existing Additional Application with the same Name.

**If you clicked OK when you should have clicked Cancel, you can remove them with this plugin: (Bulk) Remove Additional Applications

 

 


 

  • Like 2
  • Unusual Gem 1
Link to comment
Share on other sites

  • 1 month later...

This is a great plugin. Thank you for making it. Are you accepting payment for additional features, by any chance?

Desired enhancements:

  1. Exact Pattern match search of existing Additional Apps
  2. Bulk Find/Replace (exact pattern match only).

Example:

  • Application Command-Line Parameters of an Additional App contains a typo: -hiddne -exit -play
  • Perform a Find/Replace using pattern: dne
  • Plugin finds all Additional Apps that contain that exact pattern and presents a multi-select list for the user to select which games to modify.
  • User provides the new string to replace: den
  • Plugin makes the replacement on all selected games

By restricting this new feature down only to exact matching, I'm hoping the complexity is much lower (no fuzzy searching, no wildcards, etc etc). Thoughts?

Link to comment
Share on other sites

@megashub Thank you very much!! Glad you like it.  As for me accepting payment for additional features, as nice as it would be, no.  If a request is within my abilities, I'll just add it.  With discretion, of course. ;) 

As for your requests, I can  a l m o s t  see #1 being convenient.  If say you're filling in the Application Command-Line Parameters, you'd get a dropdown list of all the cl Parameters used for additional apps in that Platform to select from [or finish typing your own].  The "almost" part is that it's kind of a redundancy of the intent of this plugin:  You select all your desired games, fill in the 'form' [once], click OK and you're done. 

But I'm thinking this isn't what you meant.  I think what you want is what was referenced to in the Additional Notes:.  A Bulk Edit Additional apps plugin.  Which (as far as I'm aware of) [still] doesn't exist.  And for good reason.  The LaunchBox API (which is what's used to create plugins) doesn't include a method for editing Additional Apps.  Though there is Add New and Delete Existing, I imagine with a bit of (a lot of 'a bit of' ) finessing using those, someone could make that work.

There is however an easy fix/resolution/cure_for_the_typo... 

  • Exit LaunchBox
  • Go to your ../LaunchBox/Data/Platforms/ folder and edit the platform.xml file with a text editor. (Notepad++ is my got-to)
    • 'platform' is the Platform that has the typo in it. (Backup of your xml file first. Just in case)
  • Go to Search, Replace... (or press Ctrl+H)
  • Fill in Find what: and Replace with: and click Replace All  (Check your spelling before clicking Replace All! :D)
  • Save and exit
  • Start LaunchBox (BigBox)
  • Play games

image.thumb.png.58c9b552490a47eea7541fcf90f7804e.png

Use the full command line because who knows what else in the file has simply "dne".

  • Unusual Gem 1
Link to comment
Share on other sites

Hi, thanks for this plugin. I have a playlist called "Lightgun Games" that I used it to launch (2) instances of my lightgun software before each game, worked great. The only think I see is that the (2) instances do not close when exiting the game. Any ideas on that? I have "Run before main application" checked and it fires them both up great, it just leaves them running after the game. I was running them both from Windows startup but this is a cleaner way, so they aren't hanging around when not in use.

Thanks...Piper

Link to comment
Share on other sites

17 minutes ago, PiperCalls said:

Hi, thanks for this plugin. I have a playlist called "Lightgun Games" that I used it to launch (2) instances of my lightgun software before each game, worked great. The only think I see is that the (2) instances do not close when exiting the game. Any ideas on that? I have "Run before main application" checked and it fires them both up great, it just leaves them running after the game. I was running them both from Windows startup but this is a cleaner way, so they aren't hanging around when not in use.

Thanks...Piper

That's more of a LaunchBox question than something for this plugin to solve. If your lightgun software has a commandline argument to close all running instances of the software, you could use this plugin to bulk add two Additional Apps. One that Runs Before Main Application to run the software for use while playing, and another that Runs After Main Application which kills them both. Or, if the lightgun software can't do that, you could do the same thing by writing a small script to find and kill them based on their process ID #s. Or you could write a script that is Run Before Main Application which first launches the Lightgun software, but then stays running in the background watching for the game to close, and then kills the lightgun software before exiting the script. 

 

Link to comment
Share on other sites

7 minutes ago, megashub said:

That's more of a LaunchBox question than something for this plugin to solve. If your lightgun software has a commandline argument to close all running instances of the software, you could use this plugin to bulk add two Additional Apps. One that Runs Before Main Application to run the software for use while playing, and another that Runs After Main Application which kills them both. Or, if the lightgun software can't do that, you could do the same thing by writing a small script to find and kill them based on their process ID #s. Or you could write a script that is Run Before Main Application which first launches the Lightgun software, but then stays running in the background watching for the game to close, and then kills the lightgun software before exiting the script. 

 

Ok, gotcha. So I'm thinking an AHK to launch both instances and then on ESC (exit key) closes both & emu. Will have to test.

Thanks...Piper

Link to comment
Share on other sites

33 minutes ago, PiperCalls said:

Ok, gotcha. So I'm thinking an AHK to launch both instances and then on ESC (exit key) closes both & emu. Will have to test.

Thanks...Piper

Sounds right! :) 

question (selfishly): Which lightguns are you working with? My Sindens will hopefully arrive in a few more months.

Link to comment
Share on other sites

1 hour ago, PiperCalls said:

Yep Sindens, love them...so accurate. Well worth the wait.

Ooo. In that case, would you be willing to share the script/solution you settle on? Would love to not need to reinvent the wheel. 

Edited by megashub
Link to comment
Share on other sites

2 hours ago, megashub said:

Ooo. In that case, would you be willing to share the script/solution you settle on? Would love to not need to reinvent the wheel. 

Sure. With some help over at the Sinden Discord (they're very helpful) here is what I have. It IS working, with 1 exception. For games that require DemulShooter. For those games I have (2) Additional Apps...(1) that launches DemulShooter with the correct parameters for that particular game and (2) this AHK which laounches the (2) instances of Sinden software.

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance force

;AHK Script to Launch Sinden P1 & P2 prior to game/rom launch

Run, "C:\Sinden Lightgun\Sinden Gun 1P\SindenLightgunWindowsSoftwareV1.04\SindenLightgun\Lightgun.exe" -autostart,, Minimize, pid1
sleep 100
Run, "C:\Sinden Lightgun\Sinden Gun 2P\SindenLightgunWindowsSoftwareV1.04\SindenLightgun\Lightgun.exe" -autostart,, Minimize, pid2


~ESC::
Process, Close, %pid1%
Process, Close, %pid2%
ExitApp

 

 

Link to comment
Share on other sites

Is there any way to Bulk remove the Additional Apps? I saw the post about editing the platform.xml but there is no info about Additional Apps in that xml that I can see.

So from a previous try at this I bulk added (2) Additional Apps, I now have (1) Additional App that is working (on most games) but I need to remove the (2) that I bulk added with this plugin.

Thanks...Piper

Link to comment
Share on other sites

59 minutes ago, PiperCalls said:

 

Is there any way to Bulk remove the Additional Apps?

 

Unfortunately not. But what I did was backed up my Arcade.xml file in case I borked it, and then opened it with Notepad++, with the ToolBucket plugin installed. From there you can perform a multiline find and replace. In your case you'll probably be finding the whole set of lines for the app you want to remove and replacing it with null. 
 

Link to comment
Share on other sites

On 5/6/2021 at 11:01 AM, C-Beats said:

Additional App information is the platform's xml file. They are located at the bottom underneath all the game information. Search for "<AdditionalApp" (without quotes) and you should hop right to it.

Ok, that helped I am finding that. Thank you.

Question is what do I remove exactly? So I bulk-added 2 Additional Apps called "Sinden P1" and "Sinden P2"...

image.thumb.png.02691a487a7243acd4c7d343fbcfa203.png

Here is what my ArcadeClassics.xml file has...

image.thumb.png.698b46dc78f0adee347cf445b9023b19.png

It has these for all my Arcade Classics lightgun games. I want to remove all traces of both of these from all games. Would I need to remove everything from/including <AddtionalApplication> to </AdditionalApplication> for each/all game entires?

Thanks for the help...Piper

Link to comment
Share on other sites

  • 7 months later...

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