DefeatedBloodPython92 Posted January 28, 2022 Share Posted January 28, 2022 (edited) Hello there! I'm trying to make a simple AHK script to close any emulator, but for some reason it doesn't work. I tested it with notepad and worked perfectly. Esc:: Send, ^!{F4} return I'm using this along SuperF4, that's why I added the ^, and outside Launchbox works perfectly. The other one I tried, but I don't really know if it works (I found it around here) is this one: Esc:: Process, Close, {{{StartupEXE}}} return The only thing it happens in some emulators (like Cemu) is exiting fullscreen mode, but nothing else. And it's really driving me crazy. Thanks. Edited January 28, 2022 by Eussora Quote Link to comment Share on other sites More sharing options...
faeran Posted January 28, 2022 Share Posted January 28, 2022 First thing you want to check is whether you added the AHK script to the "Running Scripts" section of your Emulator window, and not the Exit Script section. This is because you need AHK to know about the Escape key while the emulator is running. 1 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted January 28, 2022 Share Posted January 28, 2022 6 hours ago, Eussora said: The other one I tried, but I don't really know if it works (I found it around here) is this one: Esc:: Process, Close, {{{StartupEXE}}} return If using this one, you should change it to $Esc:: WinClose, ahk_exe {{{StartupEXE}}} The $ in front of the hotkey does 'something' (I never really looked into exactly what that is). Usually, it's not needed but does help in certain situations. But the main point is changing the "Process" method to "WinClose". The "Process" method is like unplugging your PC to shutdown Windows. Whereas WinClose is a little more 'gentile'. "Return" is not necessary in either case. 6 hours ago, Eussora said: The only thing it happens in some emulators (like Cemu) is exiting fullscreen mode, but nothing else. Cemu shouldn't need anything in the Running AutoHotkey Scripts section. Are you running it as Admin? Here's a thread discussing it. 6 hours ago, Eussora said: I'm using this along SuperF4 I've never [had to] use SuperF4. Which makes me believe it shouldn't be needed for any emulator. But of course, there's always that odd one. When setting up most emulators in LaunchBox, it will automatically put in any required scripts in the Running [AutoHotkey] Script section for exiting the emulator. If required. 1 Quote Link to comment Share on other sites More sharing options...
DefeatedBloodPython92 Posted January 28, 2022 Author Share Posted January 28, 2022 2 hours ago, faeran said: First thing you want to check is whether you added the AHK script to the "Running Scripts" section of your Emulator window, and not the Exit Script section. This is because you need AHK to know about the Escape key while the emulator is running. 2 hours ago, JoeViking245 said: If using this one, you should change it to $Esc:: WinClose, ahk_exe {{{StartupEXE}}} The $ in front of the hotkey does 'something' (I never really looked into exactly what that is). Usually, it's not needed but does help in certain situations. But the main point is changing the "Process" method to "WinClose". The "Process" method is like unplugging your PC to shutdown Windows. Whereas WinClose is a little more 'gentile'. "Return" is not necessary in either case. Cemu shouldn't need anything in the Running AutoHotkey Scripts section. Are you running it as Admin? Here's a thread discussing it. I've never [had to] use SuperF4. Which makes me believe it shouldn't be needed for any emulator. But of course, there's always that odd one. When setting up most emulators in LaunchBox, it will automatically put in any required scripts in the Running [AutoHotkey] Script section for exiting the emulator. If required. Holy cow, that was the problem. I was saving the script in the Exit section, not the Running section. Which, now that I think about it, it makes totally sense. I assume that the Exit section is for when it closes the emulator. And WinClose, ahk_exe {{{StartupEXE}}} totally worked. So, now that I have that fixed, I have another question about it. How can I add two scripts? Cxbx needs one to go fullscreen, but I don't know how to add both scripts. Btw, if anyone knows a extremely simple script to just go fullscreen as soon as the emulator opens, that would be lovely (just send Alt+Enter when the emu loads the rom). Thanks! Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted January 28, 2022 Share Posted January 28, 2022 11 minutes ago, Eussora said: How can I add two scripts? Put the "other" script above your hotkey script (same Running Script section). 12 minutes ago, Eussora said: simple script to just go fullscreen as soon as the emulator opens Just change the emulator.exe name and replace "send {F11}" with "Send, !{Enter}" (no quotes) (then blow that, put in your escape hotkey sequence) 1 Quote Link to comment Share on other sites More sharing options...
DefeatedBloodPython92 Posted January 28, 2022 Author Share Posted January 28, 2022 11 minutes ago, JoeViking245 said: Put the "other" script above your hotkey script (same Running Script section). Just change the emulator.exe name and replace "send {F11}" with "Send, !{Enter}" (no quotes) (then blow that, put in your escape hotkey sequence) I just love you. Thank you so very much for this. I spent hours yesterday trying to figure this out all of this. Thank youuuuuu ♥♥♥ 1 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.