I'm using an AHK script to launch a PC light gun game "House of the Dead 3" from a game cabinet frontend called Mala. There is a needed 3rd party program that runs in the background called "TroubleSHOOTER" which gives the game simultaneous 2 Player capability. The problem is that Mala for some reason seems to supress this background process from running when it launches the game. My main question is...is there a way to code my AHK script to force Mala to allow the background service? If I knew how to do this I'd be set.
As an intermediate workaround, I've coded the script below. It works by opening Troubleshooter separately (opens it again even thought one copy is always running in the background anyway). The trouble with this solution is that while it works, I don't have a solution to shut this extra copy of Troubleshooter down if the user decides to Quit the game via the in game menu system rather than pressing 2 + 4 button combo.
I tried using a Window identifier script I found on the web but I don't think it identified the proper Window. I get Wintitle: Program Manager. Even if that is the correct Window title, I'm not sure how to plug it into my script. Troubleshooter needs to be closed AFTER and WITH the Window close of "THE HOUSE OF THE DEAD 3" but I'm not sure how to code that function. Please help??
SetWorkingDir, C:\Program Files (x86)\TroubleSHOOTER\
Run, C:\Program Files (x86)\TroubleSHOOTER\Trblshtr.exe ; Needed for HOTD3 Mala launch only.
SetWorkingDir, C:\Arcade\PC Arcade Ports\THE HOUSE OF THE DEAD3_EU\exe
Run, C:\Arcade\PC Arcade Ports\THE HOUSE OF THE DEAD3_EU\exe\hod3_launcher.exe ; Circumvents otherwise mandatory Launcher screen.
Run, C:\Arcade\PC Arcade Ports\THE HOUSE OF THE DEAD3_EU\exe\hod3pc.exe
WinWait, THE HOUSE OF THE DEAD 3
WinWaitClose, THE HOUSE OF THE DEAD 3 ; Menu quit. How to quit Troubleshooter as well here?
exitAPP
~1::q
~2::t
~2 & ~4::
Process, Close, Trblshtr.exe ; This works great only if the user presses 2 + 4 to quit the game.
Process, Close, hod3pc.exe
ExitAPP
return