Jump to content
LaunchBox Community Forums

Unable to exit byuu emulator with AHK scripts


smpetty

Recommended Posts

Hi all,

The new byuu emulator is excellent and easy to startup with Launchbox.  However, I am unable to exit byuu with my controller or the escape button despite trying multiple different AHK scripts.  I can map the quit and pause hotkeys through byuu, but byuu will not accept the escape key for a hotkey for exiting.  I want to be able to exit the emulator with my controller like I do on all of the other emulators.

Does anyone know how to make the controller mapped exit sequence work for byuu?

Same issue with LB pause....

Thanks in advance!

Link to comment
Share on other sites

7 hours ago, smpetty said:

Hi all,

The new byuu emulator is excellent and easy to startup with Launchbox.  However, I am unable to exit byuu with my controller or the escape button despite trying multiple different AHK scripts.  I can map the quit and pause hotkeys through byuu, but byuu will not accept the escape key for a hotkey for exiting.  I want to be able to exit the emulator with my controller like I do on all of the other emulators.

Does anyone know how to make the controller mapped exit sequence work for byuu?

Same issue with LB pause....

Thanks in advance!

I have not messed with any of his emulators in a while but just downloaded it and using stock settings (no AHK used at all) it closes with my controller exit combo I set in LB and BB. I did not even map an exit emulator button in the emulator UI. Looks like Alt+F4 is a standard exit for the emulator and that is one of the commands LB controller automation sends.

Can you share a pic of the edit emulator screen in Launchbox. Show the details page and the Running AHK tab.

Link to comment
Share on other sites

Set the exit hotkey in byuu to something else.  For example, I use q as a hotkey in byuu to quit the eumulator.  Then in LB put this in your running autohotkey script:

$Esc::
Send {q down}
Sleep 50
Send {q up}

Now when using the controller automation, or esc key in LB, it will pass on the q key to byuu, which will trigger the emulator to exit.

I'm not sure about the byuu emulator, but I know his previous emulators such as Higan did not save properly if you used alt-f4 to close the emulator.  Better off binding a hotkey and using ahk scripts, just in case this one is similar with that quirk :)

Edited by CDBlue
Link to comment
Share on other sites

8 minutes ago, CDBlue said:

Set the exit hotkey in byuu to something else.  For example, I use q as a hotkey in byuu to quit the eumulator.  Then in LB put this in your running autohotkey script:

$Esc::
Send {q down}
Sleep 50
Send {q up}

Now when using the controller automation, or esc key in LB it will pass on the q key to byuu, which will trigger the emulator to exit.

Is this what you are using? It works for me without any AHK. Tested it on several of my cabinets. I am curious as to the difference why it is not closing for him (or you as well if this is what you are using) without an AHK script. Higan was one from the AHK thread it was discovered one of the older close scripts did not close properly for saves. It was using a force close command.

Link to comment
Share on other sites

Since that whole higan not saving properly when not closed properly, with any of his emulators I always map a hotkey to the exit command within the emulator and then use an AHK script to call the exit function properly in the emulator.  And yes, this is the script I currently use for byuu, and what i used for bsnes before that.

Link to comment
Share on other sites

20 minutes ago, CDBlue said:

Since that whole higan not saving properly when not closed properly, with any of his emulators I always map a hotkey to the exit command within the emulator and then use an AHK script to call the exit function properly in the emulator.  And yes, this is the script I currently use for byuu, and what i used for bsnes before that.

Gotcha. I was going to recommend mapping to a key then a similar script, but since it closed fine without one I did not. Alt+F4 is a safe close command for byuu and does not affect save states. I remember the higan issue was the Process, Close , {{{StartupEXE}}} command was forcing close and messing with saves. Hey as long as it works and keeps the saves it does not hurt to set a key and use a good AHK and probably better safe with his emulators. I still wonder why it is not working for the OP. Thanks for sharing your tip with him.

Link to comment
Share on other sites

Retro88 & CDBlue -

Thank you both very much.  As soon as I get home from work I will test both of your suggestions.  Interestingly, I mapped the q key to quit (and the p key to pause) in byuu and tried sending the q key by way of the exit AHK script to exit the emulator.   The script that CDBlue uses is different than the one that I cobbled together by looking at other scripts, so I'm hopeful it will work for me too. 

Is the pause funtionality in LB/BB also mapped to a certain key (like "p") or is it more complicated to tie in to?  My pause controller combo does nothing in byuu.

Edited by smpetty
Link to comment
Share on other sites

Pause menu doesn't actually pass on a pause option to an emulator, as far as I know.  The better thing to do in byuu's video options, set the emulator to pause on loss of focus.  That way, when you press your key combo to go to the pause screen in LB/BB, the emulator "should" pause.  To be honest, I'm not 100% sure if that works or not, as I don't really use the pause screens that much, and I haven't tested it with many emulators.

Link to comment
Share on other sites

1 hour ago, smpetty said:

Retro88 & CDBlue -

Thank you both very much.  As soon as I get home from work I will test both of your suggestions.  Interestingly, I mapped the q key to quit (and the p key to pause) in byuu and tried sending the q key by way of the exit AHK script to exit the emulator.   The script that CDBlue uses is different than the one that I cobbled together by looking at other scripts, so I'm hopeful it will work for me too. 

Is the pause funtionality in LB/BB also mapped to a certain key (like "p") or is it more complicated to tie in to?  My pause controller combo does nothing in byuu.

What CDBLue posted will work as that is what I tested also. But then again no AHK works for me as well. So just make sure you map "Q" in byuu to exit and you should be fine.

Pause in LB by default is mapped to the "P" key, but you can map it to any key you want. LB and BB have their own mappings so set them in both. Also in the Pause Screen tab make sure you have "Suspend Emulator..." box ticked otherwise it will run in the background. That option is what sends the pause state to the emulator. Otherwise in the emulator I did not change any other settings. Test pause and it pauses the game, brings up the menu, and exits from the menu as well.

Link to comment
Share on other sites

I would suggest to map q (lower case) not Q (upper case) in the emulator.  I'm not sure if it will matter or not in this instance, but I have seen cases where case does matter with AHK scripts.  When it comes to coding, case does usually matter ;) It might show as a Q in the hotkey even if you press q, but that's fine as long as q is what's mapped.  If you do map it, and it doesn't work, try changing the script I posted to a Q.  But, that is the script I use and it works 100% for me when mapped to "q".

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