I'm trying to create a "Table Launcher" script that would be global for all "roms", or better stated, table title passed from Mala for Future Pinball. I need an outside launcher in order to set up my own two-button close command AND assign several keystrokes to other keys so I can have full control using my X-Arcade controller. Many keystokes can't be configured in Future Pinball preferences. I don't want to have to use a mouse or keyboard. This is for full arcade cabinet control.
I'm a beginner with Auto Hot Key and need help please!! I'm thinking there's got to be a way to get this to work, without creating an AHK file for each an every table (I got that to work that way already).
Below is my NON-working strategy and code. Please tell me where I've gone wrong.:
I've compiled my AHK file (code below) to become an .exe file so I can point my chosen frontend, Mala, to it to launch Future Pinball WITH the chosen table from the Mala gamelist. I'm just not sure how to pass the title of the chosen table onto the script so that it loads and launches the correct table each time.
In my Mala Options menu>>Other Emu Config>>Future Pinball Basics tab:
I've set the Executable as my "TableLauncher.exe" file, which is my compiled AHK file.
Rom path is pointed to my table folder. Will see files such as Superman.fpt, Dead Hunters.fpt, PinballTableX.fpt, etc.
Rom Extensions is "fpt"
Under the Execution tab>>Command line:
My command line is set to "%path%\%rom%.%.ext%".
And now finally the AHK compiled code:
SetWorkingDir, C:\Arcade\Future Pinball\
#SingleInstance force
Table=%Rom%.fpt ; This is the part I'm not sure of. How to pass the name of the table to the script variable so it loads?

Run, "Future Pinball.exe" /open "C:\Arcade\Future Pinball\Tables\%Table% /play /exit ; Is %Tables% right???
WinWait, (c)
WinWait, BSP
WinWait, Software
Sleep 500
WinActivate, ahk_class FuturePinballOpenGL
WinWaitClose, BSP
Ctrl::F1 ;Full Table View 1
LAlt::F2 ;Full Table View 2
Space::F3 ;Scrolling View 1
LShift::F4 ;Scrolling View 2
z::F5 ; Low Angle View 1
x::F6 ; Low Angle View 2
c::F7 ; Fixed View
5::F8 ; Special Views including Apron View
[::F11 ; Free Camera View
r::Numpad8 ;To set alternate Nudge UP control. Numpad8=Nudge Up in FP preferences.
Numpad4::d ;To set alternate Nudge Right control. D=Nudge Right in FP preferences.
g::Numpad6 ;To set alternate Nudge Left control. Numpad6=Nudge Left in FP preferences.
Numpad2::f ;To set alternate Pull control. Numpad2=Pull in FP preferences.
a::Tab
s::SendInput, {Pause} ; fixed this from my initial post. this is the proper way to remap the Pause/Break key
w::PgUp ; To set Music Volume Up
]::PgDn ; To set Music Volume Down
e::Home ; To set Sound Volume Up
6::End ; To set sound Volume Down
~2 & ~4::
Send, {ESC}
Process, Close, Future Pinball.exe
ExitAPP
return
Again, I'm just not sure how to pass and use the name of the table as the "rom name" in the script to use it to launch any table.
How does the script receive the selected table title? How can it be used to launch the unique table/game each time? How does Mala pass this info? I assumed it is passed as the name of the rom (%rom%) right?
I don't know. I'm real fuzzy on this. Please help Nitz or anyone else out there that knows more about this stuff.
Thanks in advance.