headkaze Posted August 12, 2009 Posted August 12, 2009 Just knocked up this little plugin for people who want to launch things before and after a game. You don't have to even use the ini file to have the extra variables listed below as it modifies the command line that GameEx uses by replacing the variables. You can also use the ini file to launch 8 different apps before and after a game for each emulator.PlugInLaunch v1.0 for GameEx By HeadKaze========================================-: Description :-This plugin allows you to launch apps before and after games in GameEx. It also allows you to launch games with extra variables from GameEx's standard launch method (see below).-: Ini File :-The PlugInLaunch.ini file located in C:\Program Files\GameEx\PLUGINS can be edited to add specific command line's for each emulator. You can have up to 8 different command lines to launch. To create a custom section for an emulator use the "TitleText" property from an emulator config.Here is an example:[MAME]LaunchBefore1="C:\Program Files\PPJoy\PPJoyKey.exe" C:\Config\[ROMNAME].iniLaunchAfter1=taskkill /f /IM PPJoyKey.exe-: Command Line Variables :-Launching using this plugin allows you to replace variables with values sent from GameEx. Here are a list of accepted variables.Data from databases:[CATEGORY], [YEAR], [DEVELOPER], [DESCRIPTION]Data from MAME:[PLAYERS], [CONTROL], [CLONEOF], [ORIENTATION], [videoWIDTH], [videoHEIGHT], [COCKTAIL]General Data:[EMUNUM], [EMUNAME], [GAMENAME], [ROMPATH], [ROMNAME], [ROMFILTER], [sNAPPATH], [TITLEPATH], [CMDLINE]Download 4 Quote
lingpanda Posted August 13, 2009 Posted August 13, 2009 Thanks. My biggest issue with the built in run before and after is with batch files and my ipac. If I use a batch file for run before. The run after batch doesn't work. I hope this works. Quote
lingpanda Posted August 15, 2009 Posted August 15, 2009 [Nulldc] // Pull name from where? LaunchBefore1=LaunchAfter1=How do I use this with my NUllDc emu? Is this just for Mame? Is this what I do? Quote
Tom Speirs Posted August 15, 2009 Posted August 15, 2009 Im guessing it does support emulators too as its using the plugin system, but it does not say how in the readme.Im sure HK will tell us. PS: HK - Thanks for this. Quote
headkaze Posted August 15, 2009 Author Posted August 15, 2009 I use what is sent to the plugin from GameEx as "Info.EmulatorName" which I believe is the same as the "TitleText" property in the emulator config. So create a section in the PlugInLaunch.ini using the text from there. Quote
Adultery Posted April 25, 2011 Posted April 25, 2011 I hate to bump this thread, but is there a way around the [ROMFILE] variable so I can get this to launch DaemonsTools? [ROMPATH]/[ROMFILE] doesn't seem to be working. Quote
fRequEnCy Posted April 25, 2011 Posted April 25, 2011 I hate to bump this thread, but is there a way around the [ROMFILE] variable so I can get this to launch DaemonsTools? [ROMPATH]/[ROMFILE] doesn't seem to be working.I'm gonna probably go with the reason that [ROMFILE] is not a valid parameter. So I wouldn't expect "[ROMPATH]\[ROMFILE]" to work. See below:General Data:[EMUNUM], [EMUNAME], [GAMENAME], [ROMPATH], [ROMNAME], [ROMFILTER], [sNAPPATH], [TITLEPATH], [CMDLINE] Quote
Adultery Posted April 25, 2011 Posted April 25, 2011 I know. I was hoping it could be added. I'm trying some things to see if I can eliminate DT from my rig and use Tom's VirtualDrive instead. [ROMNAME].cue doesn't work either. Quote
fRequEnCy Posted April 25, 2011 Posted April 25, 2011 I know. I was hoping it could be added. I'm trying some things to see if I can eliminate DT from my rig and use Tom's VirtualDrive instead. [ROMNAME].cue doesn't work either.Hmmmm. That should work if in fact [ROMNAME].cue does exist. I haven't tried this plugin but am familiar with the plugin system and this is a wall I've hit as well. I haven't gotten a straight answer for it myself lately but the plugin system doesn't export the rom with extension in a variable. If it does then I hope we both can receive an answer about it. VirtualDrive is ok for basic function but IMO I would still stick with DT. Quote
Adultery Posted April 25, 2011 Posted April 25, 2011 Yeah. I also learned that the virtualdrive doesn't load cue sheets. Ahh crap! I guess I can live without xpadder for now... Would be nice to get my combo keys working for state saves though.I don't know if it matters but I think the [ROMNAME] variable isn't working because remove brackets is set to yes, so it's not really passing the full file name. Quote
headkaze Posted April 25, 2011 Author Posted April 25, 2011 Happy to add support for it but the problem is GameEx only passes certain info to the plugin.Namely[StructLayout(LayoutKind.Sequential)]public struct Game_Info{ public int EmulatorNumber; public string EmulatorName; public string GameName; public string ROMPath; public string ROMName; public Database GameData; public Mame_Info MameInfo; public string ROMFilter; public string SnapPath; public string TitlePath; public string CMDLine;};So I guess we really need a new plugin version with this field added? It might be time for a new plugin format with all the new screens and extra data added in recent versions of GX. Quote
fRequEnCy Posted April 25, 2011 Posted April 25, 2011 Happy to add support for it but the problem is GameEx only passes certain info to the plugin.Namely[StructLayout(LayoutKind.Sequential)]public struct Game_Info{ public int EmulatorNumber; public string EmulatorName; public string GameName; public string ROMPath; public string ROMName; public Database GameData; public Mame_Info MameInfo; public string ROMFilter; public string SnapPath; public string TitlePath; public string CMDLine;};So I guess we really need a new plugin version with this field added? It might be time for a new plugin format with all the new screens and extra data added in recent versions of GX.That would be great! The rom name with the extension is really needed. I hope this can be added. Quote
Adultery Posted May 3, 2011 Posted May 3, 2011 I was so excited about the news I had to bump this! Prayers answered? Only in GameEx land! PS: Headkaze, you're the best evar!!1!11!B! Quote
Adultery Posted May 3, 2011 Posted May 3, 2011 Ahh HK! You're the man! I'll do this as soon as I get home. Quote
Adultery Posted May 4, 2011 Posted May 4, 2011 OK, here's my findings.I can now get xpadder to launch in this plugin. However when I try to run Daemon Tools, the image will not mount to the drive. If I put the "Launch Before" and "Launch After" in GameEx, and I put the xpadder command line in the plugin, it works just fine. I have tried copying and pasting the cmd line that works in GameEx into the plugin INI, and I have tried tweaking things as I thought of things to try.No matter, everything works now, and my SSF 0.12 Beta is functioning like a dream now. Thanks a million HK! Quote
Adultery Posted June 17, 2012 Posted June 17, 2012 This has been updated by the way.2.0 adds a GUI and a couple minor changes (moved the log and ini to it's own folder instead of the root directory), but at it's core,code inside is still Headkaze's. It might be inside GameEx already, but if not here's the rar: Quote
Tom Speirs Posted June 29, 2012 Posted June 29, 2012 Is it OK to include this in the GameEx install?Thanks.EDIT: I am going to assume thats OK. Hope that is alright.I like doing releases of GameEx when I have not done any work! Quote
headkaze Posted June 30, 2012 Author Posted June 30, 2012 Is it OK to include this in the GameEx install?Thanks.EDIT: I am going to assume thats OK. Hope that is alright.I like doing releases of GameEx when I have not done any work!No problem here Quote
Adultery Posted June 30, 2012 Posted June 30, 2012 I got caught slipping! LOL!Had to change something (I was using the ComboBox.SelectedText property when I should have been using ComboBox.SelectedItem). This is gonna need an update. After I know it works I'll post a new version.Sorry guys. :*( Quote
Adultery Posted July 4, 2012 Posted July 4, 2012 Updated to 2.2: Thanks a million Bigby for the rigorous testing! The plugin now works 100% with DTLite, and case is irrelevant in variable names. Quote
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.