-
Posts
553 -
Joined
-
Last visited
Content Type
Forums
Events
Downloads
Store
Development Tracking
HyperCL
Everything posted by blur
-
be sure to use basic version of autohotkey when compiling advanced L version gives this error i will put compiled exe in a while
-
It's comming right now Enjoy Here is the code, uses same images, so just have to save it as fplaunch.ahk and compile Esc or P (both of them work) are used for pausing, 1 while in pause will get you out of FP and VP just the same. VP is using this big nice blue pause screen, FP shows hiscores while paused. Happy new year to you all /** * FPLaunch MOD Version 1.29 * Modified by dumpster.monkey (samwyze) & blur * Based on original FPLaunch 1.2 BadBoyBill * Includes modified pause code from ManoWars Nuevo FPLaunch 1.2 * Includes exit png's based on jpg's from BBB's 'exit feature' thread * Includes support for Exit key acting as a Pause in VP and FP by blur * Esc and then 1 exits, Esc and then Esc again takes you back to the game * For pause to work in FP you have to assign one mouse or gamepad * button to pause in FP, this script is using right mouse button (RButton) * Includes support for saving FP table positions on exit by blur * * All images to be placed in %HyperPinDir%\Media\HyperPin\Images * * There will be a slight slow-down on first launch while default * values are written to the settings.ini file. To avoid this you * can manually add the following section and keys to your settings.ini * file in the %HyperPinDir%\Settings folder: * [FPLaunch] * exitScriptKey = q & s * exitEmulatorKey = Esc * toggleCursorKey = t * pauseVPinball = p * hideCursor = true * hideDesktop = true * hideTaskbar = true * useExitScreen = false * usePauseKey = true * useLoadScreen = true * fadespeed = 25 * useExitAsPause = true * exitEmulatorKey2 = ~1 * pauseFPKey = RButton * saveFPTables = true * * NOTE: This is a wip and is by no means complete or optimized * Feel free to disect, mod, clean, optimize, distribute or delete! * * Autohotkey script by BadBoyBill [email protected] * CursorHide by Lazlo * * If you are reading this and do not have autohotkey you can get it * @ http://www.autohotkey.com/download/ * If you would like to modify this script and share it thats OK, but * see if your modification is something that we would like to add * to the official version. * * Refer to the autohotkey documentation for the keyoboard keylist * * If this script does not support your favorite emulator * then please request support @ http://www.hyperspin-fe.com/forum * * Supports Future Pinball and Visual Pinball * */ #SingleInstance force ;Prevent Multiple instances #InstallKeybdHook SetTitleMatchMode 2 ;Use relaxed title matching #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. ;******************************************************************************* ;* EDIT BELOW THIS POINT AT YOUR OWN RISK * ;******************************************************************************* ;------------------------------------------------------------------------------; ; GET PARAMATERS AND SET HOTKEYS ; ;------------------------------------------------------------------------------; ;CHECKING FOR 2 PARAMS, IF NOT THEN EXIT If 0 < 2 { MsgBox Usage: FPLaunch.ahk/exe "System Name" "Rom Name" ExitApp } systemName = %1% tableName = %2% hyperini = %A_ScriptDir%\Settings\Settings.ini picDir = %A_ScriptDir%\Media\HyperPin\Images\ ;------------------------------------------------------------------------------; ; GET AND CHECK PATHS ; ;------------------------------------------------------------------------------; Gosub, CheckINI IniRead, iniEmuPath, %hyperini%, %systemName%, Path emuPath := GetFullName(iniEmuPath) IniRead, iniTablePath, %hyperini%, %systemName%, Table_Path tablePath := GetFullName(iniTablePath) IniRead, executable, %hyperini%, %systemName%, Exe iniKeys = exitScriptKey,exitEmulatorKey,hideCursor,toggleCursorKey,hideDesktop,hideTaskbar ,useExitScreen,usePauseKey,pauseVPinball,useLoadScreen,fadespeed ,useExitAsPause,exitEmulatorKey2,pauseFPKey,saveFPTables Loop, parse, iniKeys, `, { IniRead, %A_LoopField%, %hyperini%, FPLaunch, %A_LoopField% } loadspeed := fadespeed * 10 romExtension = Gosub, CheckInis If (useexitScreen = "true" && (systemName = "Visual Pinball")) { Exiting = 0 Exit = gui, 99:add,picture,hwndexitpic, %A_ScriptDir%\Media\HyperPin\Images\Exit_1.png controlgetpos,,,wExit,hExit,,ahk_id %exitpic% gui, 99:destroy wExit := Round(wExit*A_ScreenWidth/1280) xExit := Round(A_ScreenWidth/2-(wExit/2)) hExit := Round(hExit*A_ScreenHeight/800) yExit := Round(A_ScreenHeight/2-(hExit/2)) Hotkey, %exitEmulatorKey%, exitScreen } Else if (useExitAsPause = "true") { Paused = 0 Hotkey, $%exitEmulatorKey%, PauseVP Hotkey, $%exitEmulatorKey2%, ExitVP } Else Hotkey, $%exitEmulatorKey%, CloseVP If (usePauseKey = "true" && systemName = ("Visual Pinball")) { Paused = 0 PausePic = gui, 98:add,picture,hwndpausepic, %picDir%\Media\HyperPin\Images\Pause.png controlgetpos,,,wPause,hPause,,ahk_id %pausepic% gui, 98:destroy wPause := Round(wPause*A_ScreenWidth/1280) xPause := Round(A_ScreenWidth/2-(wPause/2)) hPause := Round(hPause*A_ScreenHeight/800) yPause := Round(A_ScreenHeight/2-(hPause/2)) Hotkey, %pauseVPinball%, pauseVP } If (useLoadScreen = "true" && (systemName = "Visual Pinball")) { ProgBar = 0 gui, 97:add,picture,hwndloadpic, %A_ScriptDir%\Media\HyperPin\Images\Loading.png controlgetpos,,,wLoad,hLoad,,ahk_id %loadpic% gui, 97:destroy wLoad := Round(wLoad*A_ScreenWidth/1280) xLoad := Round(A_ScreenWidth/2-(wLoad/2)) hLoad := Round(hLoad*A_ScreenHeight/800) yLoad := Round(A_ScreenHeight/2-(hLoad/2)) wLoadProgress := Round(20*A_ScreenWidth/1280) xLoadProgress := Round(145*A_ScreenWidth/1280) hLoadProgress := Round(194*A_ScreenHeight/800) yLoadProgress := Round(288*A_ScreenHeight/800) } Hotkey, %exitScriptKey%, exitScript If (hideCursor = "true") { MouseMove %A_ScreenWidth%,%A_ScreenHeight% Hotkey, %toggleCursorKey%, ToggleCursor SystemCursor("Off") } If (hideTaskbar = "true") { WinHide ahk_class Shell_TrayWnd WinHide Start ahk_class Button } If (hideDesktop = "true") { Gui +LastFound +AlwaysOnTop -Caption +ToolWindow Gui, Color, 000000 Gui, Show, x0 y0 W%A_ScreenWidth% H%A_ScreenHeight%, blackScreen } WinClose, cmd.exe ;------------------------------------------------------------------------------; ; RUN SYSTEM ; ;------------------------------------------------------------------------------; ;**********************************FUTURE PINBALL*********************************** If (systemName = "Future Pinball" && (executable = "Future Pinball.exe")) { if (useExitAsPause = "true") { Paused = 0 Hotkey, $%exitEmulatorKey%, PauseFP Hotkey, $%exitEmulatorKey2%, ExitFP Hotkey, $%pauseVPinball%, PauseFP } else Hotkey, $%exitEmulatorKey%, CloseFP if (saveFPTables = "true") Run, "%emuPath%\%executable%" /open "%tablePath%\%tableName%.fpt" /play /arcaderender,,UseErrorLevel else Run, "%emuPath%\%executable%" /open "%tablePath%\%tableName%.fpt" /play /Exit /arcaderender,,UseErrorLevel WinWait, ahk_class FuturePinball WinHide, ahk_class FuturePinball Gui, Destroy Process, WaitClose, Future Pinball.exe } Else If (systemName = "Visual Pinball" && (executable = "VPinball.exe")) { Run, "%emuPath%\%executable%" /play -"%tablePath%%tableName%.vpt",, Min UseErrorLevel ;Run Minimized ;was the best way I could hide the vp editor and play loading screens as WinHide didn't seem to find them DetectHiddenWindows on If (useLoadScreen = "true") ;Draw the loading Gui with wrapped Progress bar { Gui, Destroy ; kill Gui blackScreen Gui, Color, EEAA99 Gui, Margin, 0, 0 Gui, Add, Picture, h%hLoad% w%wLoad% vLoadPic, %picDir%loading.png Gui, Add, Progress, x%xLoadProgress% y%yLoadProgress% w%wLoadProgress% h%hLoadProgress% -smooth 0x8 c0C32A5 vLoading vertical BackgroundFFFFFF Gui +AlwaysOnTop -Caption +Lastfound Gui, Show, AutoSize Center, loadScreen WinSet, TransColor, EEAA99 Loop { ProgBar += 1 If ProgBar = %loadspeed% { GuiControl,, Loading, 1 ProgBar = 0 } IfWinExist, Visual Pinball Player,, DMD ;Check if visual pinball is Ready { IfWinExist, ahk_class WindowsForms10.Window.8.app.0.378734a { WinMinimize, ahk_class VPinball WinActivate, ahk_class WindowsForms10.Window.8.app.0.378734a WinActivate, Visual Pinball Player,, DMD WinWaitActive, Visual Pinball Player,,,DMD WinHide, HyperPin Break } IfWinExist, ahk_class MAME { WinMinimize, ahk_class VPinball WinActivate, ahk_class MAME WinActivate, Visual Pinball Player,, DMD WinWaitActive, Visual Pinball Player,,,DMD WinHide, HyperPin Break } } } } Else { WinWait, Visual Pinball Player,, DMD ;Wait for vp to be Ready before killing Gui blackScreen WinHide, ahk_class VPinball WinActivate, Visual Pinball Player,, DMD } Gui, Destroy DetectHiddenWindows off Process, WaitClose, VPinball.exe } Else { MsgBox,48,Error,%systemName% is an invalid System Name or %executable% isnt supported yet,6 } ;------------------------------------------------------------------------------; ; WHEN EMULATOR FINISHES OR IF LAUNCH EXE FAILS ; ;------------------------------------------------------------------------------; ;************PROBABLY DO NOT NEED TO EDIT THIS AREA************* If (ErrorLevel = "Error") { MsgBox,48,Error,Failed to Run executable Check your paths,6 } Goto exitScript ; Exits script and Returns to frontend ;------------------------------------------------------------------------------; ; KILL COMMANDS ; ;------------------------------------------------------------------------------; ;************PROBABLY DO NOT NEED TO EDIT THIS AREA************* CloseProcess: Hotkey, %exitScriptKey%, Off Process, Close, %executable% Process, WaitClose, %Executable% Return PauseFP: if (Paused = 0) Paused = 1 else Paused = 0 Send {%pauseFPKey%} return ExitFP: if (Paused = 1) Goto CloseFP return CloseFP: ;Future Pinball must be closed this way instead of killing process or it wil not save your last game information.i.e score/credtis Send {Escape} if (saveFPTables = "true") { Sleep, 10 WinShow, ahk_class FuturePinball WinMenuSelectItem, ahk_class FuturePinball,,File,Save Sleep, 10 WinClose, ahk_class FuturePinball } Gosub, exitScript Return CloseVP: Hotkey, %exitScriptKey%, Off ;Visual Pinball must be closed this way instead of killing process or it wil not save your last game information.i.e score/credtis DetectHiddenWindows on ;Or next line will not work Gui, Destroy WinRestore, HyperPin WinHide, ahk_class VPinball ;This line fixes where the VP Window Flashes real quick when closing the window for a cleaner Exit WinClose, ahk_class VPinball Gosub, exitScript Return exitScript: Gui, Destroy Process, Exist, HyperPin.exe If (hideTaskbar) PID := ErrorLevel If (PID) { WinActivate, ahk_pid %PID% WinWaitActive, ahk_pid %PID% } If (hideCursor) SystemCursor("On") ExitApp CreateexitScreen: Gui, Destroy Loop, 4 { ExitPic = Exit_%A_Index%.png Gui %A_Index%: Color, EEAA99 Gui %A_Index%: Margin, 0, 0 Gui %A_Index%: Add, Picture, AltSubmit BackgroundTrans x0 y0 w%wExit% h%hExit%, %picDir%%ExitPic% Gui %A_Index%: +Lastfound Gui %A_Index%: Show, AutoSize Center Hide WinSet, TransColor, EEAA99 Winset, Transparent , 0 Gui %A_Index%: -Caption } Return exitScreen: Gosub CreateexitScreen Loop, 4 { GuiNum := 5 - A_Index Gui %GuiNum%:Show } LoopVal = 0 Gui, 4:+Lastfound Winset, Transparent, 255 Transvalue = 0 Loop { GetKeyState, state, Esc If state = D { If LoopVal = 5 { Gui, 3:+LastFound Transvalue = 0 } Else If LoopVal = 35 { Gui, 2:+LastFound Transvalue = 0 } Else If LoopVal = 60 { Gui, 1:+LastFound Transvalue = 0 } If LoopVal > 5 { If LoopVal < 90 Transvalue+=10 Winset, Transparent, %Transvalue% } Sleep, %fadespeed% If LoopVal = 90 { If(systemName = "Visual Pinball") { Gosub, CloseVP } Loop, 4 { Gui, %A_Index%: Destroy } Break } } Else { Loop, 4 { Gui, %A_Index%: Destroy } Transvalue = 0 LoopVal = 0 WinActivate, Visual Pinball Player,, DMD Break } LoopVal += 1 } Return CreatePauseScreen: Gui, Destroy Gui, Color, EEAA99 Gui, Margin, 0, 0 Gui, Add, Picture, h%hPause% w-1 vPausePic, %picDir%Pause.png Gui +AlwaysOnTop -Caption +Lastfound Gui, Show, Hide, pauseScreen WinSet, TransColor, EEAA99 Return pauseVP: Gosub CreatePauseScreen If (Paused = 0) { Gui, Show Winactivate Paused = 1 } Else { Gui, Hide WinActivate, Visual Pinball Player,, DMD Paused = 0 } Return ExitVP: if (Paused = 1) Goto CloseVP return OnExit, exitScript Return ;------------------------------------------------------------------------------; ; REST OF SCRIPT ; ;------------------------------------------------------------------------------; ;************PROBABLY DO NOT NEED TO EDIT THIS AREA************* SystemCursor(OnOff=1) ; INIT = "I","Init"; OFF = 0,"Off"; TOGGLE = -1,"T","Toggle"; ON = others { static AndMask, XorMask, $, h_cursor ,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13 ; system cursors , b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13 ; blank cursors , h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13 ; handles of default cursors If (OnOff = "Init" or OnOff = "I" or $ = "") ; init when requested or at First call { $ = h VarSetCapacity( h_cursor,4444, 1 ) VarSetCapacity( AndMask, 32*4, 0xFF ) VarSetCapacity( XorMask, 32*4, 0 ) system_cursors = 32512,32513,32514,32515,32516,32642,32643,32644,32645,32646,32648,32649,32650 StringSplit c, system_cursors, `, Loop %c0% { h_cursor := DllCall( "LoadCursor", "uint",0, "uint",c%A_Index% ) h%A_Index% := DllCall( "CopyImage", "uint",h_cursor, "uint",2, "int",0, "int",0, "uint",0 ) b%A_Index% := DllCall("CreateCursor","uint",0, "int",0, "int",0 , "int",32, "int",32, "uint",&AndMask, "uint",&XorMask ) } } If (OnOff = 0 or OnOff = "Off" or $ = "h" and (OnOff < 0 or OnOff = "Toggle" or OnOff = "T")) $ = b ; use blank cursors Else $ = h ; use the saved cursors Loop %c0% { h_cursor := DllCall( "CopyImage", "uint",%$%%A_Index%, "uint",2, "int",0, "int",0, "uint",0 ) DllCall( "SetSystemCursor", "uint",h_cursor, "uint",c%A_Index% ) } } ToggleCursor: SystemCursor("Toggle") Return ;Get Full Path from Relative Path GetFullName( fn ) { static buf, i If !i i := VarSetCapacity(buf, 512) DllCall("GetFullPathNameA", "str", fn, "uint", 512, "str", buf, "str*", 0) Return buf } CheckINI: IfNotExist, %A_ScriptDir%\HyperPin.exe { MsgBox,48,Error, Must be in same directory as HyperPin.exe,6 Goto exitScript } IfNotExist, %A_ScriptDir%\Settings\Settings.ini { MsgBox,48,Error,Cannot Find %A_ScriptDir%\Settings\Settings.ini,6 Goto exitScript } Return CheckInis: romFound = StringRight, emuPathBackSlash, EmuPath, 1 StringRight, tablePathBackSlash, TablePath, 1 If (emuPathBackSlash != "\" || tablePathBackSlash != "\") { MsgBox,48,Error, Make sure your paths Contains a backslash on the end ,6 Goto exitScript } If (executable = "") { MsgBox,48,Error, Missing executable in Settings.ini ,6 Goto exitScript } If (tablePath = "") { MsgBox,48,Error, Missing rom path in Settings.ini ,6 Goto exitScript } If (emuPath = "") { MsgBox,48,Error, Missing emulator path in Settings.ini ,6 Goto exitScript } If (exitScriptKey = "ERROR") or (useExitAsPause = "ERROR") Gosub addIni IfNotExist, %EmuPath%%Executable% { MsgBox,48,Error,Cannot Find %EmuPath%%Executable%,6 Goto exitScript } Return addIni: IniWrite, q & s, %hyperini%, FPLaunch, exitScriptKey IniWrite, Esc, %hyperini%, FPLaunch, exitEmulatorKey IniWrite, t, %hyperini%, FPLaunch, toggleCursorKey IniWrite, p, %hyperini%, FPLaunch, pauseVPinball IniWrite, true, %hyperini%, FPLaunch, hideCursor IniWrite, true, %hyperini%, FPLaunch, hideDesktop IniWrite, true, %hyperini%, FPLaunch, hideTaskbar IniWrite, false, %hyperini%, FPLaunch, useExitScreen IniWrite, true, %hyperini%, FPLaunch, usePauseKey IniWrite, true, %hyperini%, FPLaunch, useLoadScreen IniWrite, 25, %hyperini%, FPLaunch, fadespeed IniWrite, true, %hyperini%, FPLaunch, UseExitAsPause IniWrite, ~1, %hyperini%, FPLaunch, exitEmulatorKey2 IniWrite, RButton, %hyperini%, FPLaunch, pauseFPKey IniWrite, true, %hyperini%, FPLaunch, saveFPTables exitScriptKey = q & s exitEmulatorKey = Esc toggleCursorKey = t pauseVPinball = p hideCursor = true hideDesktop = true hideTaskbar = true useExitScreen = false usePauseKey = true useLoadScreen = true fadespeed = 25 useExitAsPause = true exitEmulatorKey2 = ~1 pauseFPKey = RButton saveFPTables = true Return
-
sam i will put fp features in your 1.28 and make 1.29, is it ok? just be sure you don't add something in parallel. what do you think - would you like this "exit - 1" way of exiting in VP also, of course i would try put in your pause window instead of sending Esc (esc key gives unrotated! window which is unprofesional)
-
double post removed
-
uf, it's been a long ride, but here it is pause key implemented through escape key as i said fp won't receive pause key with send {Pause} or {vp13sc045} or any other way so one solution was to use Pause as physical key and configure everything around it but since it is a little awkward and i saw in some older posts that most ipac controllers don't support sending pause i searched on i found a solution in one post from loafer - in FP you can configure pause key to joystick or mouse button - i choosed right mouse button, so for this script to work you must have mouse or joystick on your cab and pick some button and configure it in fp and then adapt script. If you choose right mouse button script will work out of the box (still you have to configure fp) what does script do? it gives you protection form exiting unexpectedly actually esc brings pause and hi scores in fp, and pause menu in vp (normally esc key) another esc takes you back to game or if you press 1 (start) during pause you exit the game it is totally consistent in vp and fp additionally i've put saving of fp table position on exit which you can remove if you have all positions saved don't forget to compile feel free to test, report errors, complain, suggest, ask, ... samwyze it is still draft so there is no your loading and pause screen yet (esc screens are not needed any more) here is the code: /** * FPLaunch Version 1.11 by blur * Esc key does not exit - Esc is actually pause * Esc Esc returns you to the game * Esc 1 exits * FP saves table position (can be removed when all tables are saved) * Based on Autohotkey script 1.10 by BadBoyBill [email protected] * CursorHide by Lazlo * * If you are reading this and do not have autohotkey you can get it * @ http://www.autohotkey.com/download/ * If you would like to modify this script and share it thats OK, but * see if your modification is something that we would like to add * to the official version. * * Refer to the autohotkey documentation for the keyoboard keylist * * If this script does not support your favorite emulator * then please request support @ http://www.hyperspin-fe.com/forum * * Supports Future Pinball and Visual Pinball * */ #SingleInstance force ;Prevent multiple instances #InstallKeybdHook SetTitleMatchMode, 2 ;------------------------------------------------------------------------------; ; MAIN SETTINGS ; ;------------------------------------------------------------------------------; ; Pause = vk13sc045 ;[uNIVERSAL HOTKEYS] ;SEPERATE MULTIPLE KEYS WITH &(ampersand) up to 2 keys. exitScriptKey = q & s ;Secret hotkey(s) to exit script if needed ;Not to be confused with exit emulator keys exitEmulatorKey = Esc ;This key/key combo will close any emulators ;that do not have normal closing methods. exitEmulatorKey2 = ~1 ;This key/key combo will close any emulators ;that do not have normal closing methods. toggleCursorKey = t ;hotkey(s) to show or hide cursor if needed ;when hideCursor below is true ;[MOUSE CURSOR] hideCursor = true ;Automatically hide cursor during script ;WARNING: Make sure ALL your emu's are running fine ;[WINDOWS] hideDesktop = true ;Attempts to hide desktop with black screen, might help ;on some emu's for hiding launching windows. hideTaskbar = true ;Hide the windows taskbar when running emu's. ;WARNING: Make sure ALL your emu's are running fine ; before setting this to true as a precaution.* /* *:If for some weird reason the script hangs follow these steps to get back to normal. 1. If an emulator hangs up or cant load your game then first try to exit the emu by pressing your Emulator exit hotkey above. 2. If your emu exited but your mouse cursor is gone use your cursor toggle hotkey. 3. Next try to exit the script by pressing your Exit Script Hotkey above. This will also bring back your cursor and taskbar is they are set to true. */ ;******************************************************************************* ;* EDIT BELOW THIS POINT AT YOUR OWN RISK * ;******************************************************************************* ;------------------------------------------------------------------------------; ; GET PARAMATERS AND SET HOTKEYS ; ;------------------------------------------------------------------------------; ;CHECKING FOR 2 PARAMS, IF NOT THEN EXIT if 0 < 2 { MsgBox Usage: FPLaunch.ahk/exe "System Name" "Rom Name" ExitApp } systemName = %1% tableName = %2% Hotkey, %exitScriptKey%, ExitScript if (hideCursor = "true") { MouseMove %A_ScreenWidth%,%A_ScreenHeight% Hotkey, %toggleCursorKey%, ToggleCursor SystemCursor("Off") } if (hideTaskbar = "true") { WinHide ahk_class Shell_TrayWnd WinHide Start ahk_class Button } if (hideDesktop = "true") { Gui, Color, 000000 Gui +AlwaysOnTop -Caption +ToolWindow Gui, Show, x0 y0 W%A_ScreenWidth% H%A_ScreenHeight%, BlackScreen } WinClose, cmd.exe ;------------------------------------------------------------------------------; ; GET AND CHECK PATHS ; ;------------------------------------------------------------------------------; GoSub, CheckINI IniRead, iniEmuPath, %A_ScriptDir%\Settings\Settings.ini, %systemName%, Path emuPath := GetFullName(iniEmuPath) IniRead, iniTablePath, %A_ScriptDir%\Settings\Settings.ini, %systemName%, Table_Path tablePath := GetFullName(iniTablePath) IniRead, executable, %A_ScriptDir%\Settings\Settings.ini, %systemName%, Exe romExtension = GoSub, CheckPaths ;------------------------------------------------------------------------------; ; RUN SYSTEM ; ;------------------------------------------------------------------------------; ;**********************************FUTURE PINBALL*********************************** if (systemName = "Future Pinball" && (executable = "Future Pinball.exe")) { inPause = false Hotkey, $%exitEmulatorKey%, PauseFP Hotkey, $%exitEmulatorKey2%, ExitFP ; Run, "%emuPath%\%executable%" /open "%tablePath%\%tableName%.fpt" /play /exit /arcaderender,,UseErrorLevel ; /exit is removed to enable saving of table position on exit Run, "%emuPath%\%executable%" /open "%tablePath%\%tableName%.fpt" /play /arcaderender,,UseErrorLevel WinWait, ahk_class FuturePinball WinHide, ahk_class FuturePinball Gui, destroy Process, WaitClose, Future Pinball.exe } else if (systemName = "Visual Pinball" && (executable = "VPinball.exe")) { inPause = false Hotkey, $%exitEmulatorKey%, PauseVP Hotkey, $%exitEmulatorKey2%, ExitVP Run, "%emuPath%\%executable%" /play -"%tablePath%%tableName%.vpt",,UseErrorLevel WinWait, ahk_class VPinball WinHide, ahk_class VPinball WinWait, ahk_Class VPPlayer Gui, destroy Process, WaitClose, VPinball.exe } else { MsgBox,48,Error,%systemName% is an invalid System Name or %executable% isnt supported yet,6 } ;------------------------------------------------------------------------------; ; WHEN EMULATOR FINISHES OR IF LAUNCH EXE FAILS ; ;------------------------------------------------------------------------------; ;************PROBABLY DO NOT NEED TO EDIT THIS AREA************* if (ErrorLevel = "ERROR") { MsgBox,48,Error,Failed to run executable check your paths,6 } Goto ExitScript ; Exits script and returns to frontend ;------------------------------------------------------------------------------; ; KILL COMMANDS ; ;------------------------------------------------------------------------------; ;************PROBABLY DO NOT NEED TO EDIT THIS AREA************* CloseProcess: Hotkey, %exitScriptKey%, Off Process, Close, %executable% Process, WaitClose, %Executable% return PauseFP: if (inPause = "false") inPause = true else inPause = false Send {RButton} return ExitFP: if (inPause = "true") Goto CloseFP ;else ; Send {1} return CloseFP: ;Future Pinball must be closed this way instead of killing process or it wil not save your last game information.i.e score/credtis Send {Esc} ;Saving FP table position Sleep, 10 WinShow, ahk_class FuturePinball WinMenuSelectItem, ahk_class FuturePinball,,File,Save Sleep, 10 WinClose, ahk_class FuturePinball return PauseVP: if (inPause = "false") inPause = true else inPause = false if (inPause = "true") Send {Esc} else Send {Enter} return ExitVP: if (inPause = "true") Goto CloseVP ;else ; Send {1} return CloseVP: Hotkey, %exitScriptKey%, Off ;Visual Pinball must be closed this way instead of killing process or it wil not save your last game information.i.e score/credtis DetectHiddenWindows, on ;Or next line will not work WinHide, ahk_class VPinball ;This line fixes where the VP Window flashes real quick when closing the window for a cleaner exit WinClose, ahk_class VPinball return ExitScript: Gui, destroy Process, Exist, HyperPin.exe if (hideTaskbar) ;WinShow ahk_class Shell_TrayWnd ;WinShow Start ahk_class Button PID := errorLevel if (PID) { ;WinActivate, ahk_pid %PID% ;WinWaitActive, ahk_pid %PID% } if (hideCursor) SystemCursor("On") ExitApp OnExit, ExitScript return ;------------------------------------------------------------------------------; ; REST OF SCRIPT ; ;------------------------------------------------------------------------------; ;************PROBABLY DO NOT NEED TO EDIT THIS AREA************* SystemCursor(OnOff=1) ; INIT = "I","Init"; OFF = 0,"Off"; TOGGLE = -1,"T","Toggle"; ON = others { static AndMask, XorMask, $, h_cursor ,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13 ; system cursors , b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13 ; blank cursors , h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13 ; handles of default cursors if (OnOff = "Init" or OnOff = "I" or $ = "") ; init when requested or at first call { $ = h ; active default cursors VarSetCapacity( h_cursor,4444, 1 ) VarSetCapacity( AndMask, 32*4, 0xFF ) VarSetCapacity( XorMask, 32*4, 0 ) system_cursors = 32512,32513,32514,32515,32516,32642,32643,32644,32645,32646,32648,32649,32650 StringSplit c, system_cursors, `, Loop %c0% { h_cursor := DllCall( "LoadCursor", "uint",0, "uint",c%A_Index% ) h%A_Index% := DllCall( "CopyImage", "uint",h_cursor, "uint",2, "int",0, "int",0, "uint",0 ) b%A_Index% := DllCall("CreateCursor","uint",0, "int",0, "int",0 , "int",32, "int",32, "uint",&AndMask, "uint",&XorMask ) } } if (OnOff = 0 or OnOff = "Off" or $ = "h" and (OnOff < 0 or OnOff = "Toggle" or OnOff = "T")) $ = b ; use blank cursors else $ = h ; use the saved cursors Loop %c0% { h_cursor := DllCall( "CopyImage", "uint",%$%%A_Index%, "uint",2, "int",0, "int",0, "uint",0 ) DllCall( "SetSystemCursor", "uint",h_cursor, "uint",c%A_Index% ) } } ToggleCursor: SystemCursor("Toggle") return IniRead(Filename, Section, Key, Default = "") { FileRead, text, *t %Filename% text = `n%text%`n StringTrimLeft, text, text, InStr(text, "`n[" . Section . "]`n") Loop, 8 { sp := sp . " " StringReplace, text, text, %Key%%sp%=, %Key%= If ErrorLevel Break } start := InStr(text, "`n" . Key . "=") If !start Return, Default start += StrLen(Key) + 2 StringMid, Value, text, start, InStr(text, "`n", false, start) - start Return, Value } ;Get Full Path from Relative Path GetFullName( fn ) { static buf, i if !i i := VarSetCapacity(buf, 512) DllCall("GetFullPathNameA", "str", fn, "uint", 512, "str", buf, "str*", 0) return buf } CheckINI: IfNotExist, %A_ScriptDir%\HyperPin.exe { MsgBox,48,Error, Must be in same directory as HyperPin.exe,6 Goto ExitScript } IfNotExist, %A_ScriptDir%\Settings\Settings.ini { MsgBox,48,Error,Cannot Find %A_ScriptDir%\Settings\Settings.ini,6 Goto ExitScript } return CheckPaths: romFound = StringRight, emuPathBackSlash, EmuPath, 1 StringRight, tablePathBackSlash, TablePath, 1 If (emuPathBackSlash != "\" || tablePathBackSlash != "\") { MsgBox,48,Error, Make sure your paths contains a backslash on the end ,6 Goto ExitScript } If (executable = "") { MsgBox,48,Error, Missing executable in Settings.ini ,6 Goto ExitScript } If (tablePath = "") { MsgBox,48,Error, Missing rom path in Settings.ini ,6 Goto ExitScript } If (emuPath = "") { MsgBox,48,Error, Missing emulator path in Settings.ini ,6 Goto ExitScript } IfNotExist, %EmuPath%%Executable% { MsgBox,48,Error,Cannot Find %EmuPath%%Executable%,6 Goto ExitScript } return
-
Just tried today to send pause on esc. It looks like send pause is not working, at least not with FP. I can send esc, i can send even scroll lock, but can't send pause. The only way i did sent pause to FP is to use Pause key instead of Esc key. And I use ~Pause instead of Pause - so that key is sent through + some script can be executed that will keep track of what's going on - this way i can configure vp to do whatever and FP will get real pause key for pause. HP can also use pause instead of Esc in its config. I tried to minimize FP also (Winminimize) but it keeps on runing, because it still has focus. Will try some more things (like focusing some other window) Oh and if you have installed FP for the first time - be sure to check slamtilt's mods, for example Dark Knight available at fprelease.
-
great I was thinking about your method to close FP i think it will not work - you said you will minimize FP and put exit or pause screen on top but - when FP is minimized screen is still covered with his 3D screen (like in your fplaunch script - it was minimized but still on screen) any way - sending Pause key to FP on Esc keypress should work fine, only problem is - no way to tell user that he has to press enter after esc to really exit. maybe if we use same method for VP where we can put message people will get use to it, only if they don't bump on FP table first
-
FP is starting minimized, removed min from the end of launch line, now focus is ok
-
Great, tnx, will check it. I saw that FP is not getting focus with this script, which is peculiar since nothing new is applied to FP part of the script. Will compare it with 1.0 and 1.1 versions which focus fine with FP. I saw in this thread that FP doesn't support putting image over, so different approach will be needed to make FP not exit instantly on ESC Since FP is getting keys with send you can send anything, Pause for example Other Esc could also send Pause since it will just get you back in game, and exit - well some kind of flag should be introduced so that enter or 1 in pause mode make FP exit
-
xp here, everything works great in vp though i would put same fautures for fp also any body knows where i can find fplaunch 1.2 from bbb? I see that this script is based on it, but last one i saw was 1.1 instead of this exit 3,2,1 question, what do you think about Exit? question like in HS - so that to exit you have to press Esc and then Enter (plunger) or Start (1), and while you think, the game is waiting paused? Esc - Esc returns you to the game.
-
yeah, tell me about it will check your scripts in a few days, and try to make extra-super-top fplaunch script with you, don't have much time recently, shoping, eating, celebrating, shoping, celebrating, shoping, ...
-
FPLaunch last version - 1.295 WIP 10: http://vpuniverse.com/forums/index.php/topic/315-fplaunch-1295-wip-10/ Don't forget to read FPLaunch manual!!! FPLAUNCH MANUAL Quick Installation Guide Installation of latest FPLaunch is really easy - just unzip all files to your Hyperpin folder, images will automatically go to Media\Hyperpin\Images. You can customize your keys and other options in Settings.ini file in Settings folder in [FPLaunch] section. There is no need to recompile fplaunch when you change options in ini file, but if you change ahk script you have to recompile it with AHK_L ANSI version. Old version were compiled with basic ahk (1.0.48.05) which is not available on ahk site any more! You can find more about each option in Long Installation Guide later in this manual or in fplaunch.ahk script. Introduction Let's introduce FPLaunch with few hypothetical questions: Q: OK, can you tell me what is this FPLaunch, I use HyperPin in my cab, I use VP only, I never installed FP, do i really need this? A: FPLaunch is table launcher for HyperPin, the same as HyperLaunch is for HyperSpin. It is compiled autohotkey script (FPLaunch.ahk -> FPLaunch.exe) sitting in your HyperPin directory that is used for launching BOTH - VP AND FP tables. Q: OK, OK. Got it. So it's crucial part of HyperPin installation. But then I already have it, right? Why would I download this one? A: Main reason would be to get new bugs, and get rid of some old features (or is it the other way around ). Any way, check new features and you'll see why would you wanna download this. Q: Gee, you are funny guy , aren't you? I'm busy man. I don't have time to play games with you. (I have to play games on my cab:)) I don't have time to read all this. What are the features of this script, but short, I don't have all day? A: Well, some of most obvious features are menus, flyers and instructions accessible from the game while you play, loading image, exit coundown, pause, ... Then there is support for rosve's B2S backglasses, for slamit bigscore pinball, for bigboss's different vp exe versions, different sound levels and for turning off hdrendering on table basis, support for editing tables inside hyperpin, support for auto answering on nag questions, even if you run table for the first time, print screen (playfield image saved HP playfield folder) ... and many, many more. The story about how I begun to tweak fplaunch begins long time ago in a land far, far away... You remember the movie Chicken Run, and this old men, owner of the farm. He had this crazy idea that chickens are organized and they plan escape. And there was his wife who kept telling him "It's all in your head, it's all in your head.". So next time he saw chickens doing something suspicious he also thought "It's all in me head, it's all in me head.". You must be thinking now: "OMG, what this has to do with fplaunch manual???" It has. First time I installed hyperpin I used FP. I used arcade render mode, and every table had to be translated outside of hyperpin first. I wanted to do it directly from hyperpin. Every body said nooo, it's not possible. You must do it outside of HP. I took the fplaunch script, changed only few lines and it was possible. Now not only that you can change position, but script will automatically save that position for you when you exit table. Another example, now for VP. Story was - you have to run every table out of HP first and you have to click I agree. It's not possible to use VP tables for the first time in HP cause HP will freeze, you'll get black screen and you'll have to reboot. Again, I made it possible with few lines. Not only that you can run vp tables for the first time - you can even run vp tables with errors and HP will not freeze. With every new version efforts are made so that HP doesn't freeze and give you black screen even if table has an error. Pause in VP and FP was total El Dorado - same key - Esc - was used for pause in VP and for exit in FP. So even if you had those keys on a cab you would probably press the wrong one each time. It was also impossible to use any other key except Pause/Break for pause in FP. Again I made it possible. So what is the idea of all of this? Idea is - there are no limits - you can do what ever you want. If you think something can't be done, keep repeating to your self "It's all in me head, it's all in me head!" and you will find a way to do it Or in other words: "If there's a will, there's a way!" FPLaunch version history 1.0 First version of FPLaunch script from BBB. It is included in first HyperPin installation. You get it from that big HyperPin distribution file. It works quite ok. Only problem is - it has few known bugs which are corrected in later versions. Like black screen bug - sometimes VP and FP tables stay behind black screen which is used to hide desktop while they are loading table. You can still alt-tab to table. Another bug is taskbar bug - sometimes taskbar shows up and stays after you exit from a table and go to another file. 1.1 or 1.10 Second version of FPLaunch from BBB. It fixes black screen bug and taskbar bug. It is distributed in sticky "FPLaunch" thread in HyperPin main forum: http://www.hyperspin-fe.com/forum/showthread.php?t=2855 1.2 or 1.20 Third version of FPLaunch script from BBB This version is distributed in sticky thread "Exit feature" in HyperPin main forum: http://www.hyperspin-fe.com/forum/showthread.php?t=3062 Adds Exiting in 321 functionality to VP. When you press Esc accidentally, VP game will not exit, you have to hold Esc for few seconds to really exit and while you hold Esc you will see Exiting in 3, 2, 1 messages on screen. This is a security measure so that you don't exit accidentally (with your knee for example). Obviously it won't help you if you accidentally press power switch . 1.28 Last version from samwyze. It is based on samwyze previous 1.25 version and BBB 1.20 version. It adds loading and pause screen functionality to VP - when you open any VP table while it is loading you see loading window with slider that is moving until game is loaded. Also when you press Pause - Pause window would appear and game would stop. 1.294 Adds exit321, loading and pause screens to FP also. So now in FP you can exit and pause just the same as in VP, and you will see same loading screen with slider while FP table is loading. Some other new features are: Short press on exit is pause, long press is exit321 screen. So actually you don't need pause key on your cab. If you want to pause the game just press Esc shortly. Most people don't have pause key since there was no consistent pause in FP and VP until now (Esc would pause VP but exit from FP, and Pause key from keyboard would pause FP but do nothing in VP). So no one put Pause button on a cab. If you do have Pause key on a cab you can configure it to act as pause only (long press on pause will not get exit321 screen). HyperPin's genre key "g" can also be used as pause. Exit key and Pause key will work just the same in VP and in FP! Short press, long press, exit321, pause, everything is the same. When you are in Pause, you can press Start key (1) or Launch (Enter or whatever keys you set in settings file) to exit from the game. This is quick exit without exit321 screen and without long key press. Pause screen in FP shows hi scores also, since pause screen is the only way to see hi scores in FP. Long key press on exit will bring Exit screen just as before in VP and FP. Nag screens and some other messages in VP are visible since VP window is not hidden but minimized during launch, so you can see the message and respond to it. So HP will not freeze and you will not get just black screen if you run some table for the first time from Hyperpin and you get pinmame warning. Some error messages however are still invisible and minimized but you can alt-tab to them and they will be visible. "t" key for hiding and unhiding cursor on the screen will show taskbar also which could be useful for various purposes. Alt-F4 key will close FP or VP player and show and activate FP/VP editor and unhide cursor and taskbar and suspend all hot keys until you continue to play table. Then cursor and taskbar are hidden again and hot keys are activated. This could be useful for editing tables (and removing scores from backglass) or fixing VP/FP settings from FP/VP. While in FP you can use Scroll Lock key to position and stretch the table directly from HyperPin - no need to open every table outside of HP. When you exit from FP table will be automatically saved if you used Scroll Lock during the game. If you did not use Scroll Lock table will not be saved to speed up exiting process. If you used Alt-F4 to close VP/FP player and open editor to change the table you have to save it manually if you want to keep changes. If you forget to save dialog box will show up on exit asking you to save table. 1.295 wip 2 + enabled other exe names - so you exe can be something other other then vpinball.exe + reads logical and phyisical key state + win activate of secondary fp window (backglass) - doesn't help with fp bg problem on some new cards + put version in usage - double click on fplaunch.exe to get version + bigboss additions (more exe files, sound mods ...) + support for slamit pinball 1.295 wip 3 + winactivates removed (you have to set exe to nt4sp5 comp mode) + fix runtime error on close (you have to set exe to comp mode) + fix dmd not visible behind playfield (set exe to comp mode) + fps drop - same drop comes from lose of focus so it's not script related + shorter times for esc screens + win activate on nag screens brings them to focus and closes them 1.295 wip 4 + fix dmd not visible behind playfield + put all rosve and bigboss code to functions + write a code map + winactivate of fp after pause and printscreen + fix winactivate on z screen buffer message (msg stays in back) + fgi keys mapped to enter for slamit bigscore pinball if you don't use slamit you can remove them 1.295 wip 5 + menus from samwyze!!! + quick launch gui from HL 2.0 - just double click on fplaunch.ahk or exe and you will get it + save printscreen-a in HP playfield folder under name taken from description + options do not get overwritten, only new options are added + show instructions and flyer during the game + fix slow down after close (when vp is still closing) - fixed - you have to wait a little till windows frees memory and kills vp 1.295 wip 6 + pauseVPinball key changed to pauseKey since it is not just for VP + pauseKey acts exactly the same as exitEmulatorKey (long press also) so now you can have two keys for opening and exiting menus (Esc and p) and two keys for menu items activation (1 and enter) or you can use some gamepad keys Joy1, 2Joy3, ... + instructions are much, much bigger + flyer is bigger, and if works with different dimensions images for same table + loading menu is merged from sam's version + some parts of the code are optimized (draw image by the book), some are not + lots of work and testing so that you can always use exit, enter, flyer and instr keys for example you can press flyer to open flyer directly or go through menus with enter, same with instructions, you can also switch from flyer to instructions, you can close flyer with exit, enter or flyer key, same for instructions, all of this will work in vp and fp + ... what else, uhmmmmm let me think - yes loading menu - something was hiding, loading slider (probably vp) and unhiding taskbar - this is both fixed so taskbar is hidden every few secs and slider is unhiden + focus problem with loading screen - while slider is on the screen every few seconds we try to activate vp (avoiding dmd hack) also after aprox. 25 secs. we just close loading screen unconditionally also on exit key (or pause key) we close loading screen unconditionally and after close of loading screen there is a one sec sleep and winactivate in a loop so now you should get perfect focus on every vp game and no need for nt4 comp mode + debug mode - lot's of things was written to log file, I also added tool tip on top of the screen - but nothing is written anywhere by default, only if you enable it with this option in settings.ini 1.295 wip 7 + fixed memory leak + swf draws in same resolution, not double, faster, better image + support for many instructions cards swf, bmp, png, jpg, gif format 1.295 wip 8 + fixed b2s close bug + ledwiz support added, for more info check: http://www.vpforums.org/index.php?showtopic=16186&hl= + support for different names for hyperpin.exe 1.295 wip 9 + fixed vp doesnt close bug (detect hidden windows on) + capture screen code removed (not used any more) + printscreen for backglass added (o saves pf, u saves bg) + code map updated + reorg - all procedures moved up and down a bit + #winactivateforce added (didn't help much - actually made some wierd problems and freezes - removed) + fix focus on table close in win7 with triple checks + lots of triple checks added (ifactive, waitactive, ...) + taskbar shown on exit if there is no hyperpin process + cursor shown on exit + show vp/fp editor on error and close loading slider + activate commands moved to functions + file and screen debug modes added + toggle taskbar on t key (it was always shown, now it is hiden also) + fix blackscreen gui (no need for black screen if useloadscreen is true) + remove all detect hidden windows off + remove double exitscreen - it is executed "onexit", no need to call it + find why hyperpin freezes sometimes ??? (activate force maybe) 1.295 wip 10 + highscores added tnx to dna disturber, bleasby and horseyhorsey + custom fp and vp exe (vp/fpexetables.txt in settings dir) + custom b2s settings from koadic added (CustomB2STables.txt) + toggleLedwizKey button added to menus - tnx to deegor + toLog added to every function + external ahk script focus.exe executed on exit to focus hp + exitemulatorkey changed to exitkey + pausekey changed to exitkey1 + exitemulatorKey2 and 3 changed to enterkey and enterkey1 + upkey1 and downkey1 added - so now all menu keys are doubled (to enable keyboard and joystick keys) + usepausekey true/false removed (it is always used same as exit key) + #winactivateforce added again + memory leak found in hp on win7 if used in comp. mode - USE NATIVE MODE + taskbar problems - auto hide taskbar HAS TO BE OFF in windows + some images updated + instruction card menu item changed to instructions + improved error handling (winwait removed, mouse moved out of the loop) + jukebox support added + instructions moved a bit down so more of a playfield is visible + swf instructions will be on same position as jpg or png + antar bug - word (Play) makes problems - solved in vp 445 + comments in settings are allowed + double focus - in script and in focus.exe + useFocus internal/external/both/none added to settings + hiscores for EM games copied from VP\user\hiscore.txt + options added to ledclear.bat + sound is played after pf or bg images are saved Long Installation Guide Download fplaunch zip file from the link on top of this post. Extract ALL files from zip file to your Hyperpin directory and then move all images to Media\Hyperpin\Images directory. On first run script will add these options to your Settings.ini file in Settings directory: [FPLaunch] ; default settings, if you don't have them they will be added to your settings.ini file ; ***** don't change them here - edit your settings.ini file!!! ***** exitScriptKey = q & s ; kill script key exitEmulatorKey = Esc ; main exit key, can be joy key also (Joy1) toggleCursorKey = t hideCursor = true hideDesktop = true hideTaskbar = true ; new settings useExitScreen = true ; show exit321 countdown on long press usePauseKey = true ; if used pause key works same as exit key useLoadScreen = true ; show loading slider useExitAsPause = true ; open pause window on exit key or exit directly useExitMenu = true ; use exit menu instead of pause window pauseKey = p ; former pauseVPinball key, works same as exit key fadespeed = 25 exitEmulatorKey2 = 1 ; key for entering into menus exitEmulatorKey3 = Enter ; and another one pauseFPKey = RButton ; pause in FP saveFPTables = true ; save fp table position on exit editTableKey = !F4 ; close table and go to vp/fp editor printScreenKey = o ; save playfield printBGKey = u ; save backglass pfScreenNum = 1 ; playfield Screen Number (used for print screen) bgScreenNum = 2 ; backglass Screen Number (used for print screen) upKey = LShift ; left flipper goes up in menus downKey = RShift ; right flipper goes down in menus instructionsKey = i flyerKey = f hyperScale = 0.75 debugMode = false ledwiz = false hyperpinexe = hyperpin.exeConfigure them according to the key layout you have on your cab. It is best to leave all options at default value and then change them if something is not working. You must have all options in your settings file or FPLaunch will create new one with default value, so don't delete any options, just change them. To change any option, you don't need autohotkey compiler. Just change settings in ini file. Here is explanation of all options (not quite all - some options are not updated, some options will probably be removed in next few releases, ...): Settings.ini options exitScriptKey - dafault: q & s This is the key for forceful kill of ahk script in case of freezing. You don't need it on your cab. And you should not set it to Esc. It will not work. exitEmulatorKey - default: Esc Warning: It is recommended to use "e" key for exit key instead of "Esc" cause Esc makes lot's of problems. If you have PBW or PBW kit it is recommended to use button Joy16 for exit instead of Joy8 cause Joy8 also makes some problems. For list of known problems and info how to change exitEmulatorKey read on. 1. If you use B2S tables and if you use Esc for exit key it will close B2S backglass every time you press Esc to open exit menu. To solve this use e or some other key for exit. Warning: To use B2S tables with FPLaunch you have to let FPLaunch start and close the backglass. To do this change table name so that it ends with B2S and rename B2S exe to the same name. Also edit every B2S table and change launch backglass to false in table script. 2. Problems with some controllers (IPAC, KeyWiz, Pinball Wizard) in all tables - not just B2S: On short press of Esc key VP opens VP pause window with Quit to editor, Debug and Resume options. On long press of Esc key VP crashes and throws an error instead of clean close. On short press of Esc key FP exits instead of just pausing and invoking blue Pause screen. To solve this: Reprogram your controller or your converter (joy2key/xPadder) to send "e" instead of "Esc" on Exit button Put "e" key in settings file for exitEmulatorKey and Hyperpin Exit key, like this: [Keyboard] Exit = 69 [FPLaunch] exitEmulatorKey = e If you want to use some other key you can find keycodes for Hyperpin here: http://people.uncw.edu/tompkinsj/112/FlashActionScript/keyCodes.htm You don't need to configure this new exit key in VP or FP. 3. There are some known problems with Pinball Wizard: Pinball Wizard crashes UVP server after long press on exit button Pinball Wizard is closing FP on short press of Exit button, instead of just pausing it To solve this: Open your Pinball Wizard (if it is PBW kit then it is already open) Connect wires of Exit button to button 6, 14,15 or 16 on the PBW board. Then your Exit key will be Joy6/14/15 or 16 and it will not invoke close or kill of VP or FP. This is default button layout for PBW: FP use VP use Button position Button 1 Digital Plunger same Front side, by the plunger Button 2 Right Flipper same First on right side Button 3 Right 2nd Flipper same Second on right side Button 4 Change Camera Volume Down First yellow button Button 5 Toggle HUD Volume Up Second yellow button Button 6 Look at Backbox - Third yellow button Button 7 Pause same Fourth yellow button Button 8 Exit Table Exit after 3 sec Top center Button 9 Start Game same Front side, on the left Button 10 Left Flipper same First on left side Button 11 Left 2nd Flipper same Second on left side Button 12 Insert Coin 1 same First red button Button 13 Insert Coin 2 same Second red button Button 14 Test - Third red button Button 15 Service - Fourth red button Button 16 I think this key is not connected and not used for anything Let's say you connected Exit key to Joy16 connectors. Put "Joy16" key in settings file for exitEmulatorKey and Hyperpin Exit key in Pinball Wizard section, like this: [Pinball Wizard] Exit = 16 [FPLaunch] exitEmulatorKey = Joy16 Quick note: With Pinball Wizard section in Settings.ini you can configure any gamepad to work in HyperPin (but not in VP). Remove Joy8 as exit key from FP key configuration (Exit key should be empty in FP) Or if you don't want to open PBW you can use only short press on Exit key to open exit menu toggleCursorKey - default: t Toggles cursor and taskbar, you also don't need it on a cab. exitEmulatorKey or shortly exit key is used for exit menu, pause and exit count down (on long press). You can put here whatever key your exit button on cab sends. You don't need to configure this key in FP or VP. Only FPLaunch has to know about this key and VP and FP shouldn't know anything about it. useExitScreen = true This options controls if countdown Exiting 321 screen is shown on long press of exit key. usePauseKey = true This option controls if Pause key (pauseVPinball) is used. If used pause key works same as exit key. useLoadScreen = true This options controls if loading slider is used (hyperpin ball rolling around). useExitAsPause = true If this option is true short press on exit brings pause window or exit menu, if it is false short press on exit will exit from table without exit menu. It influences both exit and pause key. useExitMenu = true If true short press on exit brings exit menu, if false it brings pause window so there are no menus. It influences both exit and pause key. pauseKey- default: p Old name for this key was pauseVPinball. Now it is used exactly the same as exit key (exitEmulatorKey) - it brings exit menu. So you can actually have two configured exit keys all the time. If you have different pause key on your cab you can put it here. It HAS TO BE different from pauseFPkey. Just like exit key - you don't need to configure this key in FP or VP. Only FPLaunch has to know about this key, and FPLaunch will send what is needed to FP and VP to pause them. If you don't have a Pause key on your cab leave this on default value "p", and use your exit key for exit menu. fadespeed = 25 This is actually length of sleep command that is used on slider on loading screen and on Exit 321 screens. It is time in milliseconds script will sleep before going on to the next loop. If it is smaller wait is shorter and slider on loading screen and exit 321 screens will be faster. If it is larger wait is longer and loading slider and exit 321 screens are slower. exitEmulatorKey2 and exitEmulatorKey3 - default: 1 and Enter Keys for entering into menu items when you are in the menu - like instruction cards, flyers, service mode options or exit. You have two of them so that you can configure your start table key (1) and your plunger key (Enter) and use whichever you like. pauseFPKey - default: RButton - right mouse button This key is used for FP only. If you don't use FP you can skip this section. This key is used to invoke pause in FP. This key is sent from fplaunch script, you never have to physically click on mouse button. You must have mouse connected to your cab to use this key and you must use one of mouse buttons, cause nothing else will produce pause in FP. You have to configure this key in settings.ini and in your FP keys configuration. Check picture below to see how to do it. You don't have to reprogram any button on your controller to send this key. This key is sent to FP only from fplaunch script! It is important to notice the differences between pauseFPKey and pauseKey: pauseKey is physical key sent from your cab pause button - pauseFPkey is never sent physically, only from script pauseKey doesn't have to be configured in VP/FP - pauseFPkey has to be configured in FP pauseKey is used for pausing both VP and FP - pauseFPkey is used in FP only So to clear up what is happening under the hood and explain this with real life example: FP - when you press exit key or pause key on your cab (exit key is exitEmulatorKey, pause key is pauseKey) fplaunch gets them and stops them (sometimes they can't be stoped) and sends pauseFPkey (right mouse button) to FP, FP invokes pause screen and stops the game, then since we can't draw over FP we do print screen to file, then we draw this file on screen and then we draw menu over it. VP - If we are in VP then when you press exit or pause key on your cab, fplaunch script receives this key and draws menu - as soon as menu is drawn VP looses focus and VP game stops - so there is no need to send any key to vp to pause the game. Warning: If you have Pinball Wizard or KeyWiz controller, windows see them both as joysticks with buttons, so you will see them on this list. But you can't use their buttons as pauseFPkey button because ahk can't send gamepad buttons. (So ahk can't send gamepad buttons, FP can't assign keyboard buttons for pause - only mouse and gamepads - so only buttons that work are mouse buttons.) You have to use one mouse button of your choice for pause in FP and as usual your controller buttons for everything else (flippers, nudge, coin, start, plunger, ...) So you actually have to enable both devices Mouse and Joystick by clicking on "Enable" check box by both devices. Don't worry FP can use both of them and it will remember what is mapped to each device. It is best to use mouse for pause only and leave pause field for joystick empty. So you don't configure your cab Pause button for Pause in FP. You just configure it as pauseKey in settings.ini file. Same thing is with your Exit key - you don't configure it in FP, you leave this field empty. You just configure it as exitEmulatorKey in your settings.ini file. saveFPTables = true This option controls if we save FP table after change of table position with Scroll Lock. editTableKey - dafault: Alt-F4 Enables you to to go into editor from HyperPin. Closes table player and opens table editor. All hot keys are suspended during edit and reactivated when table is started again. Don't forget to launch table after editing, cause if you just close it you will have fplaunch running in the background, waiting for table and you will not get control of hyperpin wheel. printScreenKey- default: o Saves playfield image to art files location. It makes print screen, rotates image and saves it with table description name in HP's Table Images folder. Works for vp and fp. printBGKey - default: u Saves backglass image to HP folder. Works for vp and fp tables. Usefull for FP and B2S tables. Not recomended for UVP tables, cause UVP tables already have image in that directory. pfScreenNum, bgScreenNum - default: 1, 2 Number of playfield and backglass screen under windows. Used for saving images. upKey, downKey - default: LShift, RShift Key for going up and down in menus. instructionsKey - default: i Pauses the game and brings instructions image while you are in game. flyerKey - default: f Pauses the game and brings flyer image while you are in game. hyperScale - default: 0.75 Enlarges the menus. debugMode - default: false Can be true, false, none, file or screen. File - sends all debugging messages to log.txt, screen shows them on screen, true does both, and false and none - does neither. ledwiz - default: false Adds ledwiz support - for more info go to: http://www.vpforums.org/index.php?showtopic=16186&hl= hyperpinexe - default: hyperpin.exe Name of the hyperpin exe file that has to be activated after we exit from table. Usually it is hyperpin.exe except for VirtuaPins, where it is virtuapin.exe. My setup Here is the example of my setup. It will help you to see the endless posibilities of configuration tuning and using different methods for different keys. I'm using hacked ps2 style gamepad. So in its essence it is gamepad style controller. It presents itself to windows as a gamepad - just like pinball wizzard or key wiz controllers. On the other hand controllers like IPAC present them self as a keyboard keys which is a bit different story. As we all know VP can't use gamepad buttons, unless your controller is PBW or you have hacked VP exe so that it uses all gamepads as PBW. On the other hand HP, FP and FPLaunch can use gamepad keys without problems. So for any key that comes from my gamepad to be used in VP I have to convert it to some keyboard key with xpadder or joy2key, and in HP/FP/FPLaunch i can use it directly. A special care has to be taken so that each key is configured in each application only once. So if some button is converted to key with xpadder each application has to be configured to react to gamepad button or to mapped key, not to both - since double events would happen. First thing I configured were flipper keys. Easiest thing would be to map them to left and right shift, and use HP/VP/FP with default settings. BUT HP just doesn't work well with mapped shift keys. It doesn't understand which one is left and which one is right so you can't browse through tables. I could configure HP to use gamepad buttons directly in PBW section and change flipper keys in keyboard section so that it doesn't react on shifts. But i choosed the other way - I've configured xpadder to map flipper buttons to left and right cursor keys and configured HP/VP/FP and FPLaunch to use left and right cursor for flippers. It is very handy if you use cursor keys for flippers cause when I exit from the table which is not saved, I get Save - Yes No Cancel dialog box - and I can go to Yes with flippers and press Enter with plunger. Also if you map nudge keys to up and down cursor keys - you have all keys you need to play baby pacman table:)! For exit key I used Joy1 in FPLaunch and in HP PBW section. So exit key was plain button one - it was not mapped to anything with xpadder - nor Esc nor e. In VP and FP you don't have to configure anything for exit key. What else - insert coin button is mapped to 5, start game is mapped to 1 and plunger is mapped to Enter with xpadder - so all these keys are standard and don't need any configuration. Only thing that has to be done is - in settings.ini in pinball section - you have to check what are your buttons used for and change it to something else so that your buttons don't produce double events - one through PBW section - and one through keyboard section. Since nudge and coin keys are not needed in HP I'm using left nudge for instruction card, right nudge for flyer and insert coin for genre in HP. Start and plunger keys are both used to start tables - one through PBW section and one through keyboard section. How does this look like on a cab? There are two buttons on each side - one for flipper, one for nudge and flyer/instructions, and four buttons on the front side of the cab - exit button (Joy1), insert coin (Joy2 or 5), start (Joy3 or 1) and plunger (Joy4 or enter):