Build Your Own Arcade Controls Forum
Main => Software Forum => Topic started by: Wade007 on July 21, 2012, 03:22:50 pm
-
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
-
Fixed the problem at it's source. Helping Mala accept the Global Hook.
I just had to place the dll file for the process in the same folder as the executable for the game. Now Mala picks up the hook process.
copied "TRBLSHTR.dll" into the executable folder. Now it allows the running background program to run!!
I'd still be interested in knowing how to close an additional Window as a chain reaction after another one is closed (see above concern. Tried to figure it out in the AHK documentation with no success). Troubleshooter's Window title is "TroubleSHOOTER". So if anyone is willing to educate me, I'd appreciate it despite the solving of my problem otherwise. Thanks.