; Future Pinball
; Future Pinball 1.9.1.20101231
; by djvj
; 1.1
;
; Notes:
; Thanks to the FPLaunch author for some of the code
; To set fullscreen, open the emu and goto Preferences->Video / Rendering Options and set your resolution and check fullscreen.
; AHK is not 100% reliable with its focusing. If coin/start/flipper buttons don't function when you start a table, try clicking your left mouse button.
; The script will fail if you have any errors or missing files for your tables. Make sure every table is working before you turn on the LoadingScreen.
; If you use Esc as your exit_emulator_key, you may see the table editor flash in when you exit a game. This is because Esc is the default fixed key for FP so it's closing the game before ahk does.
; If you need to run FP as admin, you can try this trick
http://www.zdnet.com/blog/bott/fixing-w ... c/436?pg=4" onclick="window.open(this.href);return false; and use the other Run command commented below
;----------------------------------------------------------------------------
LoadingScreen = true
ExitScreen = true
If 0 < 2
{ MsgBox,,,Please run this through HyperSpin,2
ExitApp
}Else
Goto, Start
Start:
If ( loadingScreen = "true" ) {
Gui +AlwaysOnTop -Caption +ToolWindow
Gui Color, Black
Gui Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth%
}
sleep, 3000
Process, Close, hypersplash.exe
Run, "%executable%" /open "%romPath%\%romName%%romExtension%" /STAYINRAM /play /exit /arcaderender, %emupath%, Hide UseErrorLevel
;Run, "schtasks /run /tn “Future Pinball“", C:\Windows\system32 ; this runs FP via Task Scheduler if you need to run as admin and don't want to see a UAC popup
WinWait, ahk_class FuturePinball
WinWait, ahk_class FuturePinballOpenGL
WinActivate, ahk_class FuturePinballOpenGL
WinWaitActive, ahk_class FuturePinballOpenGL
Gui +AlwaysOnTop
sleep, 2000
Gui, destroy
WinWait, ahk_class FuturePinballOpenGLSecondary,,1
WinActivate, ahk_class FuturePinballOpenGLSecondary
WinWaitActive, ahk_class FuturePinballOpenGLSecondary,,1
WinWaitClose, ahk_class Ghost
Loop {
IfWinActive, Future Pinball ahk_class FuturePinballOpenGL
Break
WinActivate, Future Pinball ahk_class FuturePinballOpenGL
Sleep, 50
}
WinWaitActive, Future Pinball ahk_class FuturePinballOpenGL
Process, WaitClose, %executable%
WinActivate, HyperSpin
ExitApp
CloseProcess:
sleep, 2000
Process, Close, hypersplash.exe
If ( ExitScreen = "true" ) {
Gui +AlwaysOnTop -Caption +ToolWindow
Gui Color, Black
Gui Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth%
}
WinHide, ahk_class FuturePinball ; need these 2 lines otherwise the table editor flashes over the GUI
WinMinimize, ahk_class FuturePinball
WinClose, ahk_class FuturePinball
WinWaitClose, ahk_class FuturePinball ; this helps eliminate the slight flicker when you exit the table
Return