Hello everyone!
First off, what a fantastic job people have done with all of the aspects of digital pinball!! I do not have a cabinet, but hope to build one someday...probably a mini since my house is small and lacks free real eastate for a full size cabinet. For now, I play PBFX2 through steam on windows 7 with a two screen set-up using my boring old keyboard for controls. I played around with the various tools from this thread to prep myself for a real cabinet, but also to make my gaming a little more enjoyable even without a cabinet.
I am not a scripter, so the scripts below are just a combination of BigBoss's script from the begining of this thread with snippets of code I have gleaned from the net. I am simply using an icon created by AHK to launch PBFX2 through steam and have used the backglass images supplied by Duglim for my two screen set-up. I saw several mentions of using "Actual Windows Manager" to strip away the borders of the DMD when using it on a second or thrid screen. I did not want to pay for that program, so I found code for AHK that does the same. I added lines into the first script to start and stop the second script that deals with the borders of the DMD. I found the DMD locating tool ends up being a little off once the borders are stripped, but works great for finding the starting location. I only had to adjust the numbers slightly to get the DMD to line up with the bezel in the backglass images. The only thing I notice that is strange, is the GUI image loads right away, but while the PBFX2 splash screens are loading, the backglass switches to V12 (or sometimes cycles through a couple) and then once the game is loaded, switches to the first table in my list and changes properly as I scroll through the tables. Anyway, I thought I'd post the code for you smart people to have a look at and possibly refine. As I said, I am not a scripter, so I do not really know what any of it does, I just frankensteined it together to make it work.
Script #1
SetWorkingDir, C:\Users\nnn\Desktop\BackGlass
Run, "C:\Users\nnn\Desktop\BackGlass\ShowBackglass.exe" /left=2000 /top=-4 /width=1280 /height=1024 /picture=gui2.pxp.bmp,,UseErrorLevel
Run, "C:\Users\nnn\Desktop\PBFX2_temp.exe"
Run, "c:\Program Files (x86)\Steam\Steam.exe" -applaunch 226980,,UseErrorLevel
Sleep, 5000 ;let steam launch pinball fx2 before poll for it to close
Process, WaitClose, Pinball FX2.exe
Run, taskkill /IM ShowBackglass.exe,,UseErrorLevel
fullScriptPath = C:\Users\nnn\Desktop\PBFX2_temp.exe
DetectHiddenWindows, On
WinClose, %fullScriptPath% ahk_class AutoHotkey
Script #2
#Persistent
SetBatchLines, -1
Process, Priority,, High
Gui +LastFound
hWnd := WinExist()
DllCall( "RegisterShellHookWindow", UInt,hWnd )
MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" )
OnMessage( MsgNum, "ShellMessage" )
Return
ShellMessage( wParam,lParam )
{
If ( wParam = 1)
{
IfWinExist Pinball FX2 DotMatrix
{
WinSet, Style, -0xC00000 ; hide title bar
WinSet, Style, -0x800000 ; hide thin-line border
WinSet, Style, -0x400000 ; hide dialog frame
WinSet, Style, -0x40000 ; hide thickframe/sizebox
;WinMove, , , 0, 0, 1920, 1080
}
}
}
Return
Cheers!
Llyrrum
Edited by Llyrrum, 30 January 2015 - 03:59 AM.