Author Topic: Script Visual Pinball  (Read 6179 times)

Spyke

  • Newbie
  • *
  • Posts: 26
Re: Script Visual Pinball
« Reply #4 on: March 25, 2015, 04:34:15 PM »
Works well with the new script!
Thank you for helping me out.

Thank you for this frontend it's superb!
I tested several others before, but mGalaxy is the best!

Marc

Spyke

  • Newbie
  • *
  • Posts: 26
Re: Script Visual Pinball
« Reply #3 on: March 25, 2015, 02:57:32 PM »
Thanks for you reply.
I will try the other script and tell you if it work.

I modified system.xml because I want to run all emus paralell. So far I figured out, with the original system.xml it's only possible to play only one emu. Or did I understand it wrong?

Marc

mgalaxy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1167
    • Email
Re: Script Visual Pinball
« Reply #2 on: March 25, 2015, 02:49:40 PM »
Hello,

Some questions before going further:

Quote
-edit system.xml to run Visual Pinball 8 and 9 and Future Pinball
Why editing 'systems.xml' file? Everything is already set up, there's a 'Pinball entry in mGalaxy_Runway!

Quote
-cange the script I found here to fit my paths http://www.mgalaxy.com/forum/index.php?topic=404.msg1294#msg1294
Have you tried the (official) script here:
http://www.mgalaxy.com/forum/index.php?topic=440.0
(I don't remind if the script you specify in your link is working or not)

I don't have time to help you further today..but will be back tomorrow to be sure that you get it working!!

Spyke

  • Newbie
  • *
  • Posts: 26
Script Visual Pinball
« Reply #1 on: March 25, 2015, 02:27:17 PM »
Hello,

Ineed some help to run the script for exit Visual Pinball.
What I have done until now:
-edit system.xml to run Visual Pinball 8 and 9 and Future Pinball
-add folders in data for each emu - everything works fine and all emus start up well
-cange the script I found here to fit my paths http://www.mgalaxy.com/forum/index.php?topic=404.msg1294#msg1294
-create script with AutoIt
-rename the schript to mGalaxy_Script
-put script in emu folder - but it din´t work, emu didn´t start up anymore

For example VP9:
-my path is C:\Programme\Visual Pinball
-my file is VPinball921
-my script is
Code: [Select]
HotKeySet("{ESC}", "Terminate")
$path = "C:\Programme\Visual Pinball\"
$app = "VPinball921.exe"

If $CmdLine[0] == 1 Then
$PID=Run( $path & $app & " -play -" & '"' & $CmdLine[1] & '"', $path)

while _WinWaitActivePID($PID)
   sleep(500)
wend

    While 1
          Sleep(100)
    WEnd
EndIf

exit 0


Func Terminate()
WinClose ( "Visual Pinball Player")
ControlClick("[CLASS:#32770]", "Paused", 293)
WinClose ("Visual Pinball")
WinActivate ("mGalaxy")
    Exit 0
 EndFunc

 Func _WinWaitActivePID($iPid)
    While 1
        Local $list = WinList()
        For $i = 1 To $list[0][0]
            If $list[$i][0] <> "" And IsVisible($list[$i][1]) Then
                If WinGetProcess($list[$i][1]) = $iPid AND WinActive($list[$i][1]) Then Return $list[$i][0]
            EndIf
        Next
    WEnd
EndFunc

Func IsVisible($handle)
    If BitAND(WinGetState($handle), 2) Then
        Return 1
    Else
        Return 0
    EndIf

EndFunc

What is wrong? Do I have to add something to Sytem.xml? Is something wrong in script?

Thank you for help.

Marc