Hi,
is it possible to start Pinball Tables (VP and FP) with the right Version of VP or FP, like discribed in this tread for Hyperpin?
http://vpuniverse.com/forums/topic/328-tutorial-how-to-select-a-different-version-of-vp-or-fp-when-launch-tables-via-hyperpin/
Maybe it´s possible to use FPLaunch with mGalaxy?
Regards
Marc
VP8, VP9, VP10, VP Physmod5, FP
I don't know visual pinball, so I don't understand exactly what you want to do.
You have several table and you want to load some of them with VP and some other with FP ?
You can use FPlauch if :
1 - it work in fullscreen
2 - if it doesn't close after you select the table, else mGalaxy will return in same time you load the table (mGalaxy wait for the application finish to come back).
You have several table and you want to load some of them with VP and some other with FP ?
You can use FPlauch if :
1 - it work in fullscreen
2 - if it doesn't close after you select the table, else mGalaxy will return in same time you load the table (mGalaxy wait for the application finish to come back).
Sorry for the late reply.
Tried different things, butI didn´t get it work untill now......
Let me explain what I want to do.
At the moment there are 3 different versions of Visual Pinball out there, VP9, VP10 and Physmod5. The tables only work with right version of VP.
The same for Future Pinball, there are varios version of Physmods out there.
It will be possible to manage them by adding new emulators to mGalaxy, but then I didn´t get a complete gamelist and have to switch between the different emulators. My idea is to have one gamelist in mGalaxy and start the table with the right version of VP and FP.
I found a nice AHK script for PinballX http://pinballvirtual.es/vplauncher-varias-versiones-de-visual-pinball-en-pinballx/ it´s only for VP, but maybe it can be changed to work with FP too.
I tried it and added vpx and Physmod5 to table name and start them outside of mGalaxy (by klicking the table itself) it starts up with the right version of VP, but therminates then because of missing files (I think it´s because of missing Pinballx files).
Is it possible to change the script to work with mGalaxy?
Tried different things, butI didn´t get it work untill now......
Let me explain what I want to do.
At the moment there are 3 different versions of Visual Pinball out there, VP9, VP10 and Physmod5. The tables only work with right version of VP.
The same for Future Pinball, there are varios version of Physmods out there.
It will be possible to manage them by adding new emulators to mGalaxy, but then I didn´t get a complete gamelist and have to switch between the different emulators. My idea is to have one gamelist in mGalaxy and start the table with the right version of VP and FP.
I found a nice AHK script for PinballX http://pinballvirtual.es/vplauncher-varias-versiones-de-visual-pinball-en-pinballx/ it´s only for VP, but maybe it can be changed to work with FP too.
I tried it and added vpx and Physmod5 to table name and start them outside of mGalaxy (by klicking the table itself) it starts up with the right version of VP, but therminates then because of missing files (I think it´s because of missing Pinballx files).
Is it possible to change the script to work with mGalaxy?
Last edited by Spyke on Sun Feb 28, 2016 1:51 pm, edited 1 time in total.
Yep, no problem, and your script will work because
But to use it in mGalaxy it's usefull to edit the data/system.xml file in mGalaxy.
With that your script will work only with %1% param.
and you need to put the complete pinball executable path in your script if you don't want to have problem with it.
In fact your script (exe file) stay active and wait for you close the pinball application, so during this time mGalaxy will be freezed too.2 - if it doesn't close after you select the table, else mGalaxy will return in same time you load the table (mGalaxy wait for the application finish to come back).
But to use it in mGalaxy it's usefull to edit the data/system.xml file in mGalaxy.
If you select your script file as executable it will receive as command line "script.exe -play table.xxx" or "script.exe /open table.xxx /play /exit" too much useless command so you can edit (or add) theses line as<System Type="Arcade">
<Name>Pinball</Name>
<AppPath />
<RomPath />
<SnapPath />
<VidPath />
<Emu selected="0">
<Cmd id="0" name="Visual Pinball [Script]" value="-play -"%path\%file%ext"" />
<Cmd id="1" name="Future Pinball" value="/open "%path\%file%ext" /play /exit" />
</Emu>
<Extensions>.vpt,.fpt</Extensions>
<Active>False</Active>
<Script>True</Script>
<Database>False</Database>
</System>
Code: Select all
<Cmd id="0" name="My Pinball Script" value=""%path\%file%ext"" />
and you need to put the complete pinball executable path in your script if you don't want to have problem with it.
Exactly, you can't try it just with using it alone, you need to use command line, in cmd.exe(I think it´s because of missing Pinballx files).
Code: Select all
"d:/yourscript.exe" "d:/yourtable.xxx"
Last edited by Aeliss on Sun Feb 28, 2016 2:22 pm, edited 1 time in total.
Hi Aeliss,
thank you for your answer.
I did what you told me, but didn´t get it work. I´m a noob to scripting, so be patient with me.
I changed System.xml to following:
And my script looks like this:
with this I receive the error shown in picture error1
If I change the script an add the complete pinball executable path
I receive the error shown in picture error2.
Any ideas what I did wrong?
thank you for your answer.
I did what you told me, but didn´t get it work. I´m a noob to scripting, so be patient with me.
I changed System.xml to following:
Code: Select all
<System Type="Arcade">
<Name>Pinball</Name>
<AppPath>C:\Program Files (x86)\Visual Pinball\VPlaunch.exe</AppPath>
<RomPath>C:\Program Files (x86)\Visual Pinball\Tables</RomPath>
<SnapPath />
<VidPath />
<Emu selected="0">
<Cmd id="0" name="My Pinball Script" value=""%path\%file%ext"" />
<Cmd id="1" name="Future Pinball" value="/open "%path\%file%ext" /play /exit" />
</Emu>
<Extensions>.vpt,.fpt,.vpx</Extensions>
<Active>True</Active>
<Script>True</Script>
<Database>False</Database>
</System>
Code: Select all
#SingleInstance force
SetTitleMatchMode 2
DetectHiddenWindows On
SetWorkingDir %A_ScriptDir%
vpt=vpt
vpx=vpx
playme=/play
editme=/Edit
Table = %1% ;Variable direct table
SplitPath, Table, Tname, Tdir, Text, Tname_no_ext, Tdrive
SplitPath, Tdir,, vpdir
If (Text=%vpt%) or (Text=%vpx%)
{
goto Tabledetected
}
Table = %2% ;Variable from PinballX or batch file personal use.
SplitPath, Table, Tname, Tdir, Text, Tname_no_ext, Tdrive
StringTrimLeft, Table, Table, 1
SplitPath, Tdir,, vpdir
StringTrimLeft, vpdir, vpdir, 1
If (Text=%vpt%) or (Text=%vpx%)
{
if playme=%1%
function=%playme%
else
function=%editme%
goto Tabledetected
}
exitapp
Tabledetected:
IfInString, Table, physmod5
{
myexe=vpinball-physmod5-accelmod.exe
}
IfInString, Table, vpx
{
myexe=vpinballx.exe
}
if myexe=
{
myexe=VPinball991.exe
}
If function=%editme%
RunMytable =%vpdir%\%myexe% /Edit -“%Table%”
Else
RunMytable =%vpdir%\%myexe% /play -“%Table%”
Run, %RunMytable%
checkprocessagain:
Process, wait, %myexe%, 5.5
NewPID = %ErrorLevel% ; Save the value immediately since ErrorLevel is often changed.
if NewPID = 0
goto checkprocessagain
Process, WaitClose, %NewPID%
exitapp
return
If I change the script an add the complete pinball executable path
Code: Select all
myexe=C:\Program Files (x86)\Visual Pinball\VPinball991.exe
Any ideas what I did wrong?
Last edited by Spyke on Sun Feb 28, 2016 11:13 pm, edited 1 time in total.
%vpdir% is the directory so as you use the complete path just use
and I m not sure (I m using autoit, not autohkey) but I think it's better to use
or
Code: Select all
RunMytable =%myexe% /Edit -“%Table%”
Code: Select all
RunMytable ="%myexe%" /Edit -“%Table%”
Code: Select all
myexe="C:\Program Files (x86)\Visual Pinball\VPinball991.exe"
Last edited by Aeliss on Mon Feb 29, 2016 6:00 pm, edited 1 time in total.
I tried it, but didn´t get it work
Deleted %vpdir% from both RunMyTable
and get Error shown in picture without
Added quotation marks to RunMyTable
and get error shown in picture runmytable
Added quotation marks to myexe
and get error shown in picture myexe
Tried it with all versions of tables (name without anything, name within vpx, name within physmod5) and the right version of VP starts, but ends with errors. So the problem must be by starting the table itself.
I´m a little helpless.....
Deleted %vpdir% from both RunMyTable
and get Error shown in picture without
Added quotation marks to RunMyTable
and get error shown in picture runmytable
Added quotation marks to myexe
and get error shown in picture myexe
Tried it with all versions of tables (name without anything, name within vpx, name within physmod5) and the right version of VP starts, but ends with errors. So the problem must be by starting the table itself.
I´m a little helpless.....
There is a "/" to remove too with %vpdir%
But on your screenshot called "runmytable" the command is almost good, it just miss a " (or 3), all the path seems good.
If you have a space in your path you need obligatory 2 more " for path.
Can you make a c/c of your actual code pls.
But on your screenshot called "runmytable" the command is almost good, it just miss a " (or 3), all the path seems good.
If you have a space in your path you need obligatory 2 more " for path.
Can you make a c/c of your actual code pls.
Last edited by Aeliss on Tue Mar 01, 2016 4:40 pm, edited 1 time in total.
Played a little with it and I cant figure out how I create the mytable error.
the actual code is:
With this VP.exe starts, but the table didn´t start and gives the error shown in actual.jpg
After I exit mGalaxy and give ok to the error, the process VPlaunch.exe stays active and must be terminated by task manager.
the actual code is:
Code: Select all
#SingleInstance force
SetTitleMatchMode 2
DetectHiddenWindows On
SetWorkingDir %A_ScriptDir%
vpt=vpt
vpx=vpx
playme=/play
editme=/Edit
Table = %1% ;Variable direct table
SplitPath, Table, Tname, Tdir, Text, Tname_no_ext, Tdrive
SplitPath, Tdir,, vpdir
If (Text=%vpt%) or (Text=%vpx%)
{
goto Tabledetected
}
Table = %2% ;Variable from PinballX or batch file personal use.
SplitPath, Table, Tname, Tdir, Text, Tname_no_ext, Tdrive
StringTrimLeft, Table, Table, 1
SplitPath, Tdir,, vpdir
StringTrimLeft, vpdir, vpdir, 1
If (Text=%vpt%) or (Text=%vpx%)
{
if playme=%1%
function=%playme%
else
function=%editme%
goto Tabledetected
}
exitapp
Tabledetected:
IfInString, Table, physmod5
{
myexe=C:\Program Files (x86)\Visual Pinball\vpinball-physmod5-accelmod.exe
}
IfInString, Table, vpx
{
myexe=C:\Program Files (x86)\Visual Pinball\vpinballx.exe
}
if myexe=
{
myexe=C:\Program Files (x86)\Visual Pinball\VPinball991.exe
}
If function=%editme%
RunMytable ="%myexe%" /Edit -"%Table%”
Else
RunMytable ="%myexe%" /play -"%Table%”
Run, %RunMytable%
checkprocessagain:
Process, wait, %myexe%, 5.5
NewPID = %ErrorLevel% ; Save the value immediately since ErrorLevel is often changed.
if NewPID = 0
goto checkprocessagain
Process, WaitClose, %NewPID%
exitapp
return
After I exit mGalaxy and give ok to the error, the process VPlaunch.exe stays active and must be terminated by task manager.
From the code VPlaunch.exe close itself when the app in myexe close.
So if you close VPinball991.exe VPlaunch will close.
But I can't understans why it don't work, the path seem good, the only problem I m seeing is a " at the end of the pat and not at the start.
After a look on some forum I have see the command line is
So make a try with
If it don't work, I can make you an autoit script, I can't test it (I have only 1 pinball application) but the code will be easier to check.
So if you close VPinball991.exe VPlaunch will close.
But I can't understans why it don't work, the path seem good, the only problem I m seeing is a " at the end of the pat and not at the start.
After a look on some forum I have see the command line is
Code: Select all
C:\P-ROC\vpinballx.exe -play "C:\P-ROC\games\EvilDead\EvilDead2015.vpx"
Code: Select all
RunMytable ="%myexe%" -play "%Table%”
Hooray! Got it work
It didn´t work with
instead I have to use
One little difference only delete " at the end.....
For those who want to use the script, here is the working scipt:
Compiled with AHK, the name must be VPlaunch.exe and must be placed in the Visual Pinball folder next to the VPinball exe files.
You have to change the following to your needs:
path and name for physmod5 exe
path and name for vpinballx exe
path and name for standard Vpinball exe
The table-names for vpinballx must include vpx and for Physmod5 must include physmod5. Tables for VPinballXXX must include nothing in table-name.
For mGalaxy system.xml use:
It didn´t work with
Code: Select all
RunMytable ="%myexe%" -play "%Table%”
Code: Select all
RunMytable ="%myexe%" -play "%Table%
For those who want to use the script, here is the working scipt:
Code: Select all
#SingleInstance force
SetTitleMatchMode 2
DetectHiddenWindows On
SetWorkingDir %A_ScriptDir%
vpt=vpt
vpx=vpx
playme=/play
editme=/Edit
Table = %1% ;Variable direct table
SplitPath, Table, Tname, Tdir, Text, Tname_no_ext, Tdrive
SplitPath, Tdir,, vpdir
If (Text=%vpt%) or (Text=%vpx%)
{
goto Tabledetected
}
Table = %2% ;Variable from PinballX or batch file personal use.
SplitPath, Table, Tname, Tdir, Text, Tname_no_ext, Tdrive
StringTrimLeft, Table, Table, 1
SplitPath, Tdir,, vpdir
StringTrimLeft, vpdir, vpdir, 1
If (Text=%vpt%) or (Text=%vpx%)
{
if playme=%1%
function=%playme%
else
function=%editme%
goto Tabledetected
}
exitapp
Tabledetected:
IfInString, Table, physmod5
{
myexe=C:\Program Files (x86)\Visual Pinball\vpinball-physmod5-accelmod.exe
}
IfInString, Table, vpx
{
myexe=C:\Program Files (x86)\Visual Pinball\vpinballx.exe
}
if myexe=
{
myexe=C:\Program Files (x86)\Visual Pinball\VPinball991.exe
}
If function=%editme%
RunMytable ="%myexe%" -Edit "%Table%
Else
RunMytable ="%myexe%" -play "%Table%
Run, %RunMytable%
checkprocessagain:
Process, wait, %myexe%, 5.5
NewPID = %ErrorLevel% ; Save the value immediately since ErrorLevel is often changed.
if NewPID = 0
goto checkprocessagain
Process, WaitClose, %NewPID%
exitapp
return
You have to change the following to your needs:
path and name for physmod5 exe
Code: Select all
myexe=C:\Program Files (x86)\Visual Pinball\vpinball-physmod5-accelmod.exe
Code: Select all
myexe=C:\Program Files (x86)\Visual Pinball\vpinballx.exe
Code: Select all
myexe=C:\Program Files (x86)\Visual Pinball\VPinball991.exe
For mGalaxy system.xml use:
Code: Select all
<System Type="Arcade">
<Name>Pinball</Name>
<AppPath>C:\Program Files (x86)\Visual Pinball\VPlaunch.exe</AppPath>
<RomPath>C:\Program Files (x86)\Visual Pinball\Tables</RomPath>
<SnapPath />
<VidPath />
<Emu selected="0">
<Cmd id="0" name="My Pinball Script" value=""%path\%file%ext"" />
<Cmd id="1" name="Future Pinball" value="/open "%path\%file%ext" /play /exit" />
</Emu>
<Extensions>.vpt,.fpt,.vpx</Extensions>
<Active>True</Active>
<Script>True</Script>
<Database>False</Database>
</System>
If VPlaunch.exe stay active in memory, it can't work in mGalaxy, because mGalaxy will wait for it to return.
The code seem ok but you can try using
instead of
or
But I m not using AHK, so It s just suposition.
The code seem ok but you can try using
Code: Select all
RunWait, %RunMytable%
Code: Select all
Run, %RunMytable%
checkprocessagain:
Process, wait, %myexe%, 5.5
NewPID = %ErrorLevel% ; Save the value immediately since ErrorLevel is often changed.
if NewPID = 0
goto checkprocessagain
Process, WaitClose, %NewPID%
Code: Select all
Run, %RunMytable%, , , NewPID
Process, WaitClose, %NewPID%
Last edited by Aeliss on Wed Mar 02, 2016 4:35 pm, edited 1 time in total.