The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: astrog21 on March 14, 2014, 02:03:00 am

Title: Exit emulator when ESC is pressed
Post by: astrog21 on March 14, 2014, 02:03:00 am
Hi there,

I am new to forums, so sorry if I do something wrong.

On my cab, I have a button on the control panel that is wired to the ESC key. When I press it, it exits MAME and goes back in HyperSpin. Unfortunatley, the button does not exit other emulators (Boycott Advance, kat5200, Fusion e.t.c.).

I want it so that the ESC key will exit any programs except for HyperSpin (HyperSpin.exe). Is there a way to set up something like AutoHotKey, so ESC acts like Alt+F4, EXCEPT FOR HyperSpin.

I have no idea how to use AutoHotKey. Please help me!

FYI The PC is running Windows XP SP2
Title: Re: Exit emulator when ESC is pressed
Post by: EMDB on March 14, 2014, 03:11:49 am
Hi there,

I am new to forums, so sorry if I do something wrong.

On my cab, I have a button on the control panel that is wired to the ESC key. When I press it, it exits MAME and goes back in HyperSpin. Unfortunatley, the button does not exit other emulators (Boycott Advance, kat5200, Fusion e.t.c.).

I want it so that the ESC key will exit any programs except for HyperSpin (HyperSpin.exe). Is there a way to set up something like AutoHotKey, so ESC acts like Alt+F4, EXCEPT FOR HyperSpin.

I have no idea how to use AutoHotKey. Please help me!

FYI The PC is running Windows XP SP2
Use HyperLaunch. It is designed to exactly do what you want (and much more)...
Title: Re: Exit emulator when ESC is pressed
Post by: astrog21 on March 14, 2014, 05:28:32 am
Thank you! I will give that a try tomorrow and let you know how it goes.
Title: Re: Exit emulator when ESC is pressed
Post by: astrog21 on March 16, 2014, 03:08:00 am
How would I do this? I have no idea how to use AutoHotKey or HyperLaunchHQ and can't find any useful websites. Is there a website on how to use both of these programs, and some sample scripts for AHK?

Thanks for the help though. I will  play around with them some more and try to work it out.
Title: Re: Exit emulator when ESC is pressed
Post by: zorrobandito on March 22, 2014, 09:09:28 am
I struggled a bit with AutoHotKey at first, so here's a sample script that sends Alt-F4 when you press Esc:

ESC::
    Send !{F4}
    ExitAPP
return


Now you need to run this when you run the emulator. You could use a batch file or add it to a pre-command line in your front-end.
Title: Re: Exit emulator when ESC is pressed
Post by: keilmillerjr on March 22, 2014, 10:47:17 am
I struggled a bit with AutoHotKey at first, so here's a sample script that sends Alt-F4 when you press Esc:

ESC::
    Send !{F4}
    ExitAPP
return


Now you need to run this when you run the emulator. You could use a batch file or add it to a pre-command line in your front-end.

Or you could run it all the time and make that hot key only return the alt + f4 when the emulator process is running.
Title: Re: Exit emulator when ESC is pressed
Post by: Howard_Casto on March 22, 2014, 06:29:18 pm
Yeah the proper way to do it is to do a loop checking for the existence of the app in question as well. 

Just for the record I made wrappers that handle off of this, they are on my site and well over 12 years old.  They pre-date ahk and all that jazz though.

Kids today never look to see if something exists, but rather complain about it begging for help.  ;)
Title: Re: Exit emulator when ESC is pressed
Post by: Xris on June 21, 2014, 08:13:17 am
Yeah the proper way to do it is to do a loop checking for the existence of the app in question as well. 

Just for the record I made wrappers that handle off of this, they are on my site and well over 12 years old.  They pre-date ahk and all that jazz though.

Kids today never look to see if something exists, but rather complain about it begging for help.  ;)

Maybe you could be a little more specific? Like the name of the wrapper? Some have not heard of the "The Dragon King" and they come here for help. You try googling what this guy is talking about and see what you come up with. People arent "idiots" because they dont know. They just have better things to do. FYI, Your "Fixed it Felix" app doesnt fix it felix. If you map a button to the "c" key, it adds still adds credits and if you map the space bar to use the hammer, it jumps and hammers at the same time. Maybe you can look to see if something exists to help with that issue.
Title: Re: Exit emulator when ESC is pressed
Post by: EMDB on June 21, 2014, 12:08:09 pm
Code: [Select]
RunWait, snes9x.exe "%1%"
ExitApp
Esc::Send !{f4}
1::Space
2::Return

This way you can launch an emulator, pass a parameter (the game) and remap multiple keys only while the emulator is running.
Title: Re: Exit emulator when ESC is pressed
Post by: empardopo on June 23, 2014, 01:50:01 am
You can also take a look at my AllInOneFYC program.
You have the link and tutorial in my signature.

Greetings!
Title: Re: Exit emulator when ESC is pressed
Post by: kaptainsteve on June 26, 2014, 07:55:27 pm
http://joytokey.net/en/ (http://joytokey.net/en/)