Jump to content
LaunchBox Community Forums

Script requirerd to Start/Stop Mamehooker with MAME


Recommended Posts

5 hours ago, Bullvine said:

Does anyone know of a way on how to launch Mamehooker.exe  when MAME launches?

A quick search on the subject indicates that people will either start Mamehooker when LaunchBox/BigBox starts up (and leave it running) or they load and 'kill' respectively on a per game basis.

 

To load it when LB/BB starts up, got to Tools - Options - Startup Applications and add it there.

 

For per-game, you'd add an Additional Application to the game(s).  Edit the game and in the Additional Apps section, add it there and check the box Automatically Run Before Main Application.

If you have a bunch of games that you want/need to add this to, you can use the Bulk Add Additional Applications plugin to do them all at once.  Select all the games you want to add this Additional App to, then run the plugin.

 

4 hours ago, Bullvine said:

Also when MAME closes on ESC, how to kill the mamehooker .exe task??

Edit your MAME emulator and in the Running Script section, add

$Esc::
{
  WinClose, ahk_exe mamehooker.exe
  ;WinClose, ahk_exe mame.exe
}

Because we're adding an escape sequence here, you may need to un-comment the 4th line.

 

In lieu of adding per-game Additional Apps, IF Mamehooker doesn't need to be running BEFORE MAME gets launched (i.e. it can safely be started after MAME is already running), to have it load when a game using MAME is launched, you could add the following to the top of MAME's Running Script.

Run, "full/path/to/mamehooker.exe"

 

Link to comment
Share on other sites

Posted (edited)

Just tried the script, and it doesn't seem to close mamehooker down. 

 

I have it as such as the exe. is called mamehook.exe. But mamehooker is still running when I hit Escape

 

$Esc::
{
  WinClose, ahk_exe mamehook.exe
  
}
Edited by Bullvine
Link to comment
Share on other sites

21 minutes ago, Bullvine said:

I have it as such as the exe. is called mamehook.exe. But mamehooker is still running when I hit Escape

You may need to use a little more 'force'.  Try this instead:

$Esc::
{
  Process, Close, mamehook.exe
}

 

Also, is there anything else in the Running Script?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...