Jump to content
SpesoftPinballXConvert-It
Pablo Smiraglia

[TYPE] as paramater

Recommended Posts

is it possible to pass "Type" as a parameter to a launch before script ? I'm trying to use the table type in a condition to launch an app.

 

For example:

if type  pinsound run pinsoundsturio.exe

if type PROC run dmdext.exe

at this point, I had to create a separate system for PROC tables, and 3 systems for VP9/VP9PM5/VPX with pinsound. if would be great if I could do something like this:

 

echo %1

IF "%1"  "PS9" (
    start "c:\Pinball\Visual Pinball\PinSoundStudio 0.9\PinSoundStudio.exe"
    )
IF "%1"  "PS8" (
    start "c:\Pinball\Visual Pinball\PinSoundStudio 0.8\PinSoundStudio.exe"
    )
IF "%1"  "PROC" (
    start dmdext.exe mirror --source screen --position 5650 640 512 128 --no-virtual -p COM3
    start C:\P-ROC\ProcPinXBefore.exe
    )
exit

 

Share this post


Link to post
Share on other sites

I don't know about bat, but there are examples in this forum that use AutoHotkey to read the contents of tags in the xml file. You can create any extra tag that you would like in the xml for whatever you need. Examples:

 

 

Share this post


Link to post
Share on other sites
34 minutes ago, Carny_Priest said:

I don't know about bat, but there are examples in this forum that use AutoHotkey to read the contents of tags in the xml file. You can create any extra tag that you would like in the xml for whatever you need. Examples:

 

 

thanks! but I'm hoping I can avoid parsing files... PBX can pass TABLEFILE, MANUFACTURER, DESCRIPTION, RATING, etc. to a "run before" program... if it could pass TYPE, I'll be all set (with either batch or ahk). If this is not possible, I may "sacrifice" the YEAR  or RATING tags and use it for my needs

Share this post


Link to post
Share on other sites

well, I just tried [MANUFACTURER] [YEAR] and [RATING] and they do not seem to work.  Are these implemented ? the help tip implies they were...

Share this post


Link to post
Share on other sites

I have a plugin that adds some functionality to launch before and after, I can look at adding this functionality to it. I have a major revision/update I've been sitting on I can put out if you're willing to test for me... I unfortunately don't use PBX and can't really do any testing.

Share this post


Link to post
Share on other sites

Yeah, out of the box, I don't think much out of the xml is accessible for custom functions with PinballX. But as noted in the examples, you can do what you want to do if you are willing to do some outside scripting to read in the xml and registry keys. In particular, the first link in my launcher uses a custom exe tag to launch the correct executable, conditional statements to customize palettes by game for UltraDMD tables, launch PinSound Studio, etc.  Just about anything is possible to customize, if you are willing to work at it. Otherwise, you can make a request here and maybe it will happen and maybe it won't:

 

Share this post


Link to post
Share on other sites
20 hours ago, Carny_Priest said:

Yeah, out of the box, I don't think much out of the xml is accessible for custom functions with PinballX. But as noted in the examples, you can do what you want to do if you are willing to do some outside scripting to read in the xml and registry keys. In particular, the first link in my launcher uses a custom exe tag to launch the correct executable, conditional statements to customize palettes by game for UltraDMD tables, launch PinSound Studio, etc.  Just about anything is possible to customize, if you are willing to work at it. Otherwise, you can make a request here and maybe it will happen and maybe it won't:

 

the help tip in the ui states: "The  parameters. The following tags are supported and will be replaced with values - [TABLEPATH], [TABLEFILE], [TABLEFILEWOEXT], [MANUFACTURER], [YEAR], [SYSTEM], [RATING], [DESCRIPTION]."

i wish [TYPE] was also supported, and still would like confirmation from the devs if those tags are usable or not. if not, it may be a good idea to fix the help tip. 

at this point i had to take the long route and created an if statement for each (12) games based on TABLEFILE. i hate it, but i rather do that than maintain 4 extra systems and associated xmls for my groups. your proposal, while effective, is beyond the level of effort i'd like to put on this, bt thatnk!

 I' not the first one to ask better leverage of the xmls (put an er already). i wish there was any movement on this...

Share this post


Link to post
Share on other sites
21 hours ago, Adultery said:

I have a plugin that adds some functionality to launch before and after, I can look at adding this functionality to it. I have a major revision/update I've been sitting on I can put out if you're willing to test for me... I unfortunately don't use PBX and can't really do any testing.

thanks for the offer, but i would like to keep pbx with the least amount of plugins... it still crashes every 5 launches or so... so i want less moving parts,

 

I'm curious though why and how you develop a plugin without testing it?

Share this post


Link to post
Share on other sites

PBX and GameEx both function very similarly on the back-end, and this plugin is ported from GameEx (which I actively use). So for a developer, if you know one you know the other ( the only real notable difference is the named variables) and I have a great deal of experience with GameEx.

Share this post


Link to post
Share on other sites
22 hours ago, Adultery said:

PBX and GameEx both function very similarly on the back-end, and this plugin is ported from GameEx (which I actively use). So for a developer, if you know one you know the other ( the only real notable difference is the named variables) and I have a great deal of experience with GameEx.

Makes sense. Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×