| Main > Main Forum |
| How to use autohotkey to quit emu with ALT+F4 as exit? |
| (1/2) > >> |
| Turnarcades:
OK folks, so I confess, I've gone as far as I can adding emulators to my setup and now getting stuck on the more tricky ones. I know nothing bout autohotkey or anything like that so forgive the noob question, but I need some help with nullDC. I've got it launching OK, auto-loading the rom I need no problem. All I need to get round is the pesky fact it uses ALT+F4 to quit - and obviously I want it to go to 'Escape'. Can anyone tell me how to do this, very simply, with a step-by-step? |
| BadMouth:
Simplest way= --- Code: ---ESC:: Process, Close, nulldc.exe --- End code --- Throw that in your startup folder. It will run all the time, but won't bother anything. You can repeat the second line as many times as you want, substituting other emulators that won't close on ESC. Another option is the program Closemul. You'd just put it in the same folder as the emulator and add closemul.exe to the beginning of your command line. (set the exit keys and app in closemul.ini) |
| Turnarcades:
Thanks Badmouth. A straightforward, simple answer. Ain't had much luck with other questions recently. Either I'm trying to do some complex stuff or finding holes in emulators that could easily be sorted but no-ones asked about! I'll give what you've suggested a whirl, firstly with closemul. |
| Turnarcades:
Well closemul seems to do the trick nicely and will exit with the escape key, so thanks for that! It took some figuring out to get the correct commandline argument for the frontend .ini file, but it does indeed work. However (there's always a 'but'! lol), NullDC has a crappy habit of often crashing when closed from fullscreen for some reason. It did this before I had the closemul section added, though not all the time, and even if I eliminate the (this program had to close unexpectedly' message box, the next game I launch only launches windowed, despite my setting in the emulator's .cfg to always launch fullscreen. Any ideas? |
| nitz:
I'm guessing a workaround would be to go to windowed mode before exiting? If that's the case, try something like this. --- Code: ---DetectHiddenWindows, on #IfWinActive, WinTitle esc:: WinHide, WinTitle send !{enter} sleep 1000 WinClose, WinTitle return --- End code --- This should go to windowed mode before closing, but you won't see it, so it'll appear to exit normally, but hopefully stop the crashing problem. WinTitle is the name of the emulator window, with matching behavior determined by SetTitleMatchMode (see the relevant section in the AHK help file). The sleep command may need to be adjusted, or may not be needed at all - I'm just thinking it might not be a bad idea to give the emulator a little time to react to the change to windowed mode before trying to close it. Also, I'm assuming that you can switch to windowed mode by pressing Alt+Enter which is the usual way. Let me know if this helps. :cheers: |
| Navigation |
| Message Index |
| Next page |