Jump to content
LaunchBox Community Forums

Mamehooker and mame and launchbox


yoshi98bc
Go to solution Solved by yoshi98bc,

Recommended Posts

I am attempting to get mamehooker to launch before a mame game launches in launchbox. However, whenever i utilize the additional app section of the game and point it to mamehooker to launch before the game, mame minimizes to taskbar. But it does hook. Happens even when i use a direct ahk script thru launchbox to launch mame game and mamehooker. Happens in big box as well. Does not happen with ahk scripts for teknoparrot. Only mame. Seems like mame and mamehooker and Launchbox dont play nicely. Any thoughts? 

 

Thanks

Link to comment
Share on other sites

26 minutes ago, yoshi98bc said:

I am attempting to get mamehooker to launch before a mame game launches in launchbox. However, whenever i utilize the additional app section of the game and point it to mamehooker to launch before the game, mame minimizes to taskbar. But it does hook. Happens even when i use a direct ahk script thru launchbox to launch mame game and mamehooker. Happens in big box as well. Does not happen with ahk scripts for teknoparrot. Only mame. Seems like mame and mamehooker and Launchbox dont play nicely. Any thoughts? 

If you use an AHK script outside of LB/BB to Run mamehooker then Run mame.exe [ROM], does MAME not minimize?

Link to comment
Share on other sites

Hmmm.  LB shouldn't be telling MAME to "minimize".  Unless I suppose you have MAME windowed and in the emulator settings (in LB) you have the box for "Attempt to hide console window on startup/shutdown" checked.  Even then, I don't think LB "minimizes" what it sees as the console window. I think it just puts it at the bottom of the z-order.  (I could be wrong)

A test would be [assuming MAME is running fullscreen] is to turn off Startup Screens for your MAME emulator and see if that changes anything.  Also in the Startup Screen section, there's "Hide All Windows that are not in Exclusive Fullscreen Mode".  Again, assuming MAME is running fullscreen, may check/-un-check that. (THough don't think that'll change anything with your situation)

Another would be to create a new emulator that's your AHK script (passing the ROM name to the script). See what that does.

Is MAME Hooker set to start minimized? (if that's even an option)

 

There's aren't end-all, cure-all solutions (yet?). They're just processes of elimination.

Link to comment
Share on other sites

So i have tried everything you suggested. I turned all the startup screens options off.

 

I also created an emulator to launch the ahk script thru launchbox. It minimized mame. 

 

Mamehooker is set to hide in ahk script but doesnt do anything. 

 

I even set a sleep command in ahk script. Mame launched fine, but the second mamehooker launches mame minimizes. Once again only when launched from Launchbox.

 

I did report this as a bug since it makes absolutely no sense

Link to comment
Share on other sites

48 minutes ago, yoshi98bc said:

I even set a sleep command in ahk script. Mame launched fine, but the second mamehooker launches mame minimizes. Once again only when launched from Launchbox.

If you have the Additional App set to launch "before main application", you'd probably need to set a pretty long sleep timer.

If MAME Hooker can by physically started after MAME starts, instead of a sleep timer in the additional app, add something like Process,Wait,mame.exe.  Then load MAME Hooker.  Can add a short Sleep after the Wait to make sure MAME is fully loaded. Or better yet, WinWaitActive,ahk_exe mame.exe.

If you will be using MAME Hooker for all MAME games, instead of an additional app, you could add the script to the Running Script for the MAME emulator. (If MH can be started after MAME is running)

 

48 minutes ago, yoshi98bc said:

Mamehooker is set to hide in ahk script but doesnt do anything. 

It is almost like launchbox sees mamehooker as the active window. But its minimized in the taskbar. 

So MAME Hooker is set to hide, but all it does is minimize?

Link to comment
Share on other sites

53 minutes ago, JoeViking245 said:

If you have the Additional App set to launch "before main application", you'd probably need to set a pretty long sleep timer.

If MAME Hooker can by physically started after MAME starts, instead of a sleep timer in the additional app, add something like Process,Wait,mame.exe.  Then load MAME Hooker.  Can add a short Sleep after the Wait to make sure MAME is fully loaded. Or better yet, WinWaitActive,ahk_exe mame.exe.

If you will be using MAME Hooker for all MAME games, instead of an additional app, you could add the script to the Running Script for the MAME emulator. (If MH can be started after MAME is running)

 

So MAME Hooker is set to hide, but all it does is minimize?

I i tried a long sleep timer, and when mamehooker launches, even if mame is running, the mame window minimizes

 

I have not had any luck with mamehooker starting after mame, it wont hook when it starts after mame

 

I added mamehooker to the running script, still minimizes mame.

 

I used the Run, Add your path here/mamehook.exe,,hide in my ahk and mame still minimizes when mamehooker loads

Link to comment
Share on other sites

10 minutes ago, yoshi98bc said:

I i tried a long sleep timer, and when mamehooker launches, even if mame is running, the mame window minimizes

I have not had any luck with mamehooker starting after mame, it wont hook when it starts after mame

Thanks for confirming. If it won't hook after MAME is running, then a Sleep time won't help any. It also won't work if ran from the Running Script.

My last-ditch effort... I have no idea what your Additional App script looks like, but you might be able to add some stuff at the end to 'restore' the MAME window.

Run, "D:\SomeFolder\MAMEHooker\mamehook.exe",,Min

Process,Wait,mame.exe
WinActivate,ahk_exe mame.exe

If WinActivate doesn't produce the desired result, you can try WinMaximize.  Also, Min(imizing) might work better than "hide".

Link to comment
Share on other sites

So I tried that last idea you had and still minimizes.

 

But it doesnt minimize all the time. Which is odd

 

I also tried leaving mamehooker running when launchbox starts and it will only hook the first game

 

 

 

 

Edited by yoshi98bc
Link to comment
Share on other sites

1 hour ago, yoshi98bc said:

So I tried that last idea you had and still minimizes.  

I also tried leaving mamehooker running when launchbox starts and it will only hook the first game

You might try Googling "launchbox mamehook".  Several hits were made to threads on this forum (apparently some of which I was also involved in).  They all seemed to have resolved similar issues (some included dealing with LEDBlinky. Ignore the LED parts, but don't ignore those posts).

Link to comment
Share on other sites

So the problem seems to be ledblinky and mamehooker cannot pick up outputs of mame when both are running. Without ledblinky running mamehooker works fine. 

 

The only thing that doesnt make sense is demulshooter works fine with mamehooker and ledblinky running. Its just mame. 

 

Anyone have ledblinky and mamehooker working in mame?

 

Thanks

Link to comment
Share on other sites

  • Solution

Solved i think

 

So ledblinky author told me to delete mame.dll and now mamehooker and ledblinky get along. This file monitors mame outputs which adds minimal features to ledblinky. Well worth the compromise. 

 

Hope this helps people who use both

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...