Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: How to make AHK script allow a background process in Mala? HOTD3 tweak needed.  (Read 1431 times)

0 Members and 1 Guest are viewing this topic.

Wade007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 309
  • Last login:April 06, 2017, 01:33:35 pm
  • A MAME cabinet at home is heaven
    • bit.ly/1cWnoIC
    • Cheapskategamer.com
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
My Super Arcade cabinet project:
Software blog article: http://bit.ly/1cWnoIC

Hardware blog article: http://bit.ly/1dWxjvP

YouTube video: http://bit.ly/1N818Xm

Super Arcade Cabinet Progress thread (Now Complete):
http://forum.arcadecontrols.com/index.php/topic,123292.0.html

Frontend Video Intro: http://bit.ly/1P9HPDN

Wade007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 309
  • Last login:April 06, 2017, 01:33:35 pm
  • A MAME cabinet at home is heaven
    • bit.ly/1cWnoIC
    • Cheapskategamer.com
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.
My Super Arcade cabinet project:
Software blog article: http://bit.ly/1cWnoIC

Hardware blog article: http://bit.ly/1dWxjvP

YouTube video: http://bit.ly/1N818Xm

Super Arcade Cabinet Progress thread (Now Complete):
http://forum.arcadecontrols.com/index.php/topic,123292.0.html

Frontend Video Intro: http://bit.ly/1P9HPDN