I've been having a lot of fun with autohotkey also (though, admittedly, I'm not great with it).
Script below causes the escape key to work only if it's held for 2 seconds or more (or you can hit it rapidly to toggle this function back off) to prevent accidental exiting in mame and so forth.
;HoldEscape:
toggletimer = 0
esckill = 1
SetKeyDelay, 10, 20
$esc::
if toggletimer = 0
SetTimer, resettimer, 1000
toggletimer++
if toggletimer > 3
goto, toggleesckill
if esckill = 1
{
tt=0 ; set time to 0
loop,100
{
GetKeyState, s , esc, p
if s=U
Break
tt+=25
sleep 25
}
if tt>=2000 ; if key pressed for 2 or more sec
{
send, {esc}
toggletimer = 0
sleep 1200
}
}
else
{
send, {esc}
}
return
resettimer:
toggletimer = 0
return
toggleesckill:
soundplay, *48
toggletimer = 0
esckill *= -1
sleep 500
return
I also wrote one to act as a coin counter (pops up a translucent panel over mamewah showing a total dollar amount taken at bootup or when coming back up from standby for a few seconds and then fades out), but, as I used Veinman's lil coin counter as a gui template for it (and because it waits for mamewah, specifically, to start), I don't think I can release it.
Oh. Here's a wrapper for EveryExtend (remaps keys and dismisses the first opening dialog).
;change this line to suit your folder paths
Run, C:\EveryExtend\SGX2.exe, C:\EveryExtend,
SetTitleMatchMode, 3
WinWait, Project-SGX2, Fullscreen mode?,5
if ErrorLevel = 1
goto, Kill
ControlSend,, y, Project-SGX2, Fullscreen mode?
WinWait, Project-SGX2,,8,Fullscreen mode?
if ErrorLevel = 1
goto, Kill
SetTimer, close, 1000
*q::
*w::
*e::
*r::
*t::
*y::
*Enter::
Send {z down}
Return
*q up::
*w up::
*e up::
*r up::
*t up::
*y up::
*Enter up::
Send {z up}
Return
Close:
IfWinNotExist, Project-SGX2
exitapp
Return
kill:
winkill, Project-SGX2
exitapp
Return