Jump to content
LaunchBox Community Forums

One button quit - Sega Model 2


Integrum Retro

Recommended Posts

Go to LaunchBox > Tools > Manage Emulators > Sega Model 2 > Running AutoHotKeyScript tab and paste:

$Esc::
{
WinClose, ahk_exe emulator.exe
}

This is if you use emulator.exe as the excutable for Sega Model 2 Emulator. If you use the emulator_multicpu.exe executable paste:

$Esc::
{
WinClose, ahk_exe emulator_multicpu.exe
}

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

16 hours ago, Koroth said:

Go to LaunchBox > Tools > Manage Emulators > Sega Model 2 > Running AutoHotKeyScript tab and paste:


$Esc::
{
WinClose, ahk_exe emulator.exe
}

This is if you use emulator.exe as the excutable for Sega Model 2 Emulator. If you use the emulator_multicpu.exe executable paste:


$Esc::
{
WinClose, ahk_exe emulator_multicpu.exe
}

 

This is perfect! So follow up to this, how would I assign multiple keys? Now that I have 'ESC' for the keyboard, how about say Button11 on my controller as well?

Link to comment
Share on other sites

2 hours ago, FattyThug said:

This is perfect! So follow up to this, how would I assign multiple keys? Now that I have 'ESC' for the keyboard, how about say Button11 on my controller as well?

Button 11 = Guide button on Xbox controllers. Below I will post a script. In your LaunchBox folder go to the AutoHotKey folder: \LaunchBox\ThirdParty\AutoHotkey. There create a new text file. Copy and paste the script into the new text file. Save your text file as AutoHotkey.ahk (ahk extension). Double click AutoHotkey.exe and press your Guide button.

$vk07::
Run, notepad.exe
WinWaitActive, ahk_exe notepad.exe
WinSet, AlwaysOnTop,on ,
Send On Xbox controllers button 11 is the Guide Button. If you want to know more about button mapping: Pinned on the top of the Noobs section of the LaunchBox forum is a thread about AutoHotKey scripts. On page 25 there is a conversation about button mapping.
Run, https://forums.launchbox-app.com/topic/39811-auto-hotkey-scripts/?do=findComment&comment=372432
ExitApp

*Note*

After you have tested the script, you should probably remove it from the AutoHotkey folder!

Edited by Koroth
  • Like 2
Link to comment
Share on other sites

  • 1 year later...
$Esc::
{
WinClose, ahk_exe emulator.exe
}

 

This works for me so thanks for that.

How can I convert this script to send 3 and 4 at the same time to close the ap instead? I run this on a cabinet and I do not like to have the keyboard out.

So I have button 3 and 4 hit at the same time to exit everything else. It's basically hitting the pinball buttons on the side of my X-arcade at the same time. 

I tried switching to send 34, but thats not correct. Thanks.

 

Link to comment
Share on other sites

1 hour ago, Ebonia said:
$Esc::
{
WinClose, ahk_exe emulator.exe
}

 

This works for me so thanks for that.

How can I convert this script to send 3 and 4 at the same time to close the ap instead? I run this on a cabinet and I do not like to have the keyboard out.

So I have button 3 and 4 hit at the same time to exit everything else. It's basically hitting the pinball buttons on the side of my X-arcade at the same time. 

I tried switching to send 34, but thats not correct. Thanks.

 

Are you using those 2 buttons to exit other platform games as well?

Link to comment
Share on other sites

Yes. For example, that is how I exit Mame games. I would prefer to use the big red button on the x-arcade stick, but never figred out how to do that. It only works for retroarch. But anyway, yes I do, but would like to also use it to exit Model 2. its basically button 3 and 4. 

Link to comment
Share on other sites

10 minutes ago, Ebonia said:

Yes. For example, that is how I exit Mame games. I would prefer to use the big red button on the x-arcade stick, but never figred out how to do that. It only works for retroarch. But anyway, yes I do, but would like to also use it to exit Model 2. its basically button 3 and 4. 

If you have those 2 buttons in BigBox setting mapped to “Close Active Window” you do not need a specific AHK for those buttons. The script as is would work. Those are the 2 buttons I use on my Tankstick. Are you using the Xarcade in keyboard mode or x-input?
 

 

Link to comment
Share on other sites

3 hours ago, Ebonia said:

Ok, so I read my x-arcaed manual. Button 3 and 4 are designed to close Mame by default. So Idk. 

https://cdn.shopify.com/s/files/1/0192/2714/files/X-Arcade_Manual_USA.pdf?4536

So if there is a script to send out button 3 and 4, wouldn't that be better? That way any new emulators can be exitted, if necessary, by the same command. 

 

No, not needing a script is better than needing one. So I take it you have not mapped any buttons in BigBox then? As I mentioned if you mapped those 2 buttons in BB settings you would not need a script. 
 

If you have not then go into BB settings and go to the Keyboard Automation mapping. Map to the option labeled “Close Active Window”. Do not map for the option labeled “Exit”. 

Link to comment
Share on other sites

Ok great. Thanks I figured it out. Slightly different.

 

in big box, options, keyboard automation, 

check off the “use keyboard automation”

choose hold key, which for me was button 3 and then for “close the active window” option I choose button 4.

 

does the job, works for all emulators now.

Thanks

 

 

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