Integrum Retro Posted February 15, 2021 Share Posted February 15, 2021 When I hit "esc" while running a Sega Model 2 game from LB, it shrinks the game to window'd mode, but I'd like it to "exit" the emulator like all other emulators launched from LB. Anyone have any tricks on how they can one-button quit a Sega Model 2 game once launched from LB or BigBox? Quote Link to comment Share on other sites More sharing options...
Your Friendly A.I Overlord Posted February 15, 2021 Share Posted February 15, 2021 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 } 2 1 Quote Link to comment Share on other sites More sharing options...
Retro808 Posted February 15, 2021 Share Posted February 15, 2021 You can eliminate the need to specify the launching. exe by using {{{StartupEXE}}} $Esc:: { WinClose, ahk_exe {{{StartupEXE}}} } 1 Quote Link to comment Share on other sites More sharing options...
Integrum Retro Posted February 16, 2021 Author Share Posted February 16, 2021 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? Quote Link to comment Share on other sites More sharing options...
Your Friendly A.I Overlord Posted February 16, 2021 Share Posted February 16, 2021 (edited) 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 February 16, 2021 by Koroth 2 Quote Link to comment Share on other sites More sharing options...
Ebonia Posted April 16, 2022 Share Posted April 16, 2022 $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. Quote Link to comment Share on other sites More sharing options...
Retro808 Posted April 16, 2022 Share Posted April 16, 2022 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? Quote Link to comment Share on other sites More sharing options...
Ebonia Posted April 16, 2022 Share Posted April 16, 2022 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. Quote Link to comment Share on other sites More sharing options...
Ebonia Posted April 16, 2022 Share Posted April 16, 2022 Actually , I was just following around with it. It never produced a button in notepad when I pressed it. It seems to be a the middle mouse botton, Thats cool too. Quote Link to comment Share on other sites More sharing options...
Retro808 Posted April 16, 2022 Share Posted April 16, 2022 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? Quote Link to comment Share on other sites More sharing options...
Ebonia Posted April 16, 2022 Share Posted April 16, 2022 Yes, I have a tank stick also. Which is why I don't to bother with the keyboard. I do believe it is in keyboard mode. It works for Mame, but nothing happens when Model 2 is open. Pehaps I need to config my tankstick instead? Quote Link to comment Share on other sites More sharing options...
Ebonia Posted April 16, 2022 Share Posted April 16, 2022 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. Quote Link to comment Share on other sites More sharing options...
Retro808 Posted April 16, 2022 Share Posted April 16, 2022 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”. Quote Link to comment Share on other sites More sharing options...
Ebonia Posted April 17, 2022 Share Posted April 17, 2022 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.