Jump to content
LaunchBox Community Forums

No emulator autohotkey script for you!?


ckp

Recommended Posts

Any ahk code I put inside the ahk tab for an emulator (Demul in my test), does not run. The prepopulated close startup app part of the script in that tab seems to be working. But for any other ahk code I use, it seems to be ignored. I can't run a program (like nomousy) or even a test MsgBox. I am starting to wonder if only hotkey code works in there since I'm trying to run ahk code without a hotkey press. Or maybe this tab isn't for writing ahk code at all?

Does it work for anyone out there? 

Link to comment
Share on other sites

So I'm not sure why it worked, but I searched the launchbox folder for any exe and changed it (launchbox), big box, scummm (or whatever) all to run as administrator and that sorted it out for now it seems. Very weird. Thanks for the reply.

Edited by hoodlum54
Link to comment
Share on other sites

  • 4 weeks later...

So MAME AHK for me still isn't working. I have the following script in the AHK script box in launchbox, and when I press the numbers nothing happens. Its like it blocks the input and doesn't send anything in return. Very Strange. Any help would be amazing as it's something I've been struggling with for at least 2 weeks. 

1::
    Send 5
return

2::
    Send 6
    Send 2
return

3::
    Send 7
    Send 3
return

4::
    Send 8
    Send 4
return

None of these work at all. 

Link to comment
Share on other sites

why do you need an AHK scrpt for MAME any way you can go into MAME's setting and set up combo presses by hitting enter and the two buttons on your controller at the same time go to exit and hit enter then press your 2 buttons and you should be good to go.

Actually re-reading your post I see that you are looking to do more than exit out of games so I see why you may need the script

Edited by DOS76
Link to comment
Share on other sites

Well I'm trying to make my player 1-4 start buttons first add 2 coins then hit start. This would allow all 7 non start buttons for players 1&2 and all 4 non start buttons for players 3&4 be mapped properly. So I thought the easiest way to do it would be AHK where it would send coins then start, but does it not work with MAME? All the other platforms it's working fine with. 

Thanks so much for the quick response. I'll try disabling the script and then changing MAME to do 2 coins per press and changing it so the button is also mapped to start. That's the best method then?

Link to comment
Share on other sites

Yeah I edited my post when I saw what you were trying to do with the button presses. I don't know if that is possible through MAME you may need to use a script. I've never thought of mapping start and coin to the same button that is actually an interesting idea

Link to comment
Share on other sites

Yeah I had it working by just configuring winipac to send a macro (5,5,1) for player 1 with 5 being coin for player 1, 1 being start for player 1. It worked great for MAME, but it was messing with any other games that needed to use that button (I have a save and a load button on the cabinet and was using player start buttons as numbers for save states. So I'd hit "save" and then hit 1 if the emulator doesn't support quick save - like Mame for instance.) And I didn't like the idea of sending excess keystrokes for no reason. If I can't figure out the script I'll probably just go back to macros with winipac and make sure that the extra strokes aren't set to numbers then and are not used in the emulator. I just thought it'd be easier with AHK.

Edited by hoodlum54
Link to comment
Share on other sites

You should check out this thread. It shows how to enable ahk for MAME. 

Search for this point "The key one to make the AHK inputs work is keyboardprovider. This option MUST be set to "dinput" (for DirectInput). Without this, MAME will not read the keystrokes coming from AHK."

 

 

Hope this helps.

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