JoeViking245 Posted March 12, 2021 Share Posted March 12, 2021 (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. 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). 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 Submitter JoeViking245 Submitted 03/12/2021 Category Third-party Apps and Plugins 2 2 Quote Link to comment Share on other sites More sharing options...
megashub Posted April 28, 2021 Share Posted April 28, 2021 This is a great plugin. Thank you for making it. Are you accepting payment for additional features, by any chance? Desired enhancements: Exact Pattern match search of existing Additional Apps 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? Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted April 29, 2021 Author Share Posted April 29, 2021 @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! ) Save and exit Start LaunchBox (BigBox) Play games Use the full command line because who knows what else in the file has simply "dne". 1 Quote Link to comment Share on other sites More sharing options...
megashub Posted April 29, 2021 Share Posted April 29, 2021 oh wow. I had no idea these entries were in readable file formats. I would have gone this direction long ago had I realized that. Thank you so much for letting me know. I have no further need for a plugin in order to make such corrections. 1 Quote Link to comment Share on other sites More sharing options...
PiperCalls Posted May 5, 2021 Share Posted May 5, 2021 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 Quote Link to comment Share on other sites More sharing options...
megashub Posted May 5, 2021 Share Posted May 5, 2021 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. Quote Link to comment Share on other sites More sharing options...
PiperCalls Posted May 5, 2021 Share Posted May 5, 2021 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 Quote Link to comment Share on other sites More sharing options...
megashub Posted May 5, 2021 Share Posted May 5, 2021 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. Quote Link to comment Share on other sites More sharing options...
PiperCalls Posted May 5, 2021 Share Posted May 5, 2021 Yep Sindens, love them...so accurate. Well worth the wait. 1 Quote Link to comment Share on other sites More sharing options...
megashub Posted May 6, 2021 Share Posted May 6, 2021 (edited) 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 May 6, 2021 by megashub Quote Link to comment Share on other sites More sharing options...
PiperCalls Posted May 6, 2021 Share Posted May 6, 2021 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 Quote Link to comment Share on other sites More sharing options...
PiperCalls Posted May 6, 2021 Share Posted May 6, 2021 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 Quote Link to comment Share on other sites More sharing options...
megashub Posted May 6, 2021 Share Posted May 6, 2021 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. Quote Link to comment Share on other sites More sharing options...
PiperCalls Posted May 6, 2021 Share Posted May 6, 2021 Yea but I don't see anything in the platform.xml referencing addl apps? I'm not sure what to remove. Quote Link to comment Share on other sites More sharing options...
C-Beats Posted May 6, 2021 Share Posted May 6, 2021 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. Quote Link to comment Share on other sites More sharing options...
PiperCalls Posted May 7, 2021 Share Posted May 7, 2021 Ok thx I'll chk that. Quote Link to comment Share on other sites More sharing options...
PiperCalls Posted May 7, 2021 Share Posted May 7, 2021 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"... Here is what my ArcadeClassics.xml file has... 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 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted May 8, 2021 Author Share Posted May 8, 2021 On 5/5/2021 at 9:10 PM, PiperCalls said: Is there any way to Bulk remove the Additional Apps? You asked. We delivered. (Bulk) Remove Additional Applications (though may be a little bit too late. lol) Quote Link to comment Share on other sites More sharing options...
PiperCalls Posted May 9, 2021 Share Posted May 9, 2021 Haha, yea did it by hand but still great to see this. In case I do it again. Thx...Piper Quote Link to comment Share on other sites More sharing options...
Vojake Posted December 20, 2021 Share Posted December 20, 2021 Hello, in my launchbox 12.6 the plugin does not start. I found normal version and version2.0. Both are unblocked after download and placed in Plugin-folder. Any hints? Can you help? Thx, Rainer 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.