Script Visual Pinball
Posted: Wed Mar 25, 2015 7:27 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
What is wrong? Do I have to add something to Sytem.xml? Is something wrong in script?
Thank you for help.
Marc
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 all
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
Thank you for help.
Marc