caskad
08-31-2011, 02:56 AM
Hello,
After trying to manage esc butons in HL2.0, i failed lol :D
So i try to add in each module this kind of script because my x-arcade have lost 4 buttons...
i need to know 2 things:
i recompile hyperlaunch wit exitemulatorkey = ~esc
in Mame, fine esc dosen't work so i try this kind of code eg For Mame (but it works fine to exit other emulator)
;----------------------------------------------------------------------------
; MAME
; MAME .140
; by BBB
; 1.0
;
; Info:
; Since MAME needs to save hi scores and data on exit, then we can't force
; MAME closed with a hotkey. So make sure you have your own exit key setup
; in MAME first. We will leave the CloseProcess section below blank, but
; it is still required.
;
;----------------------------------------------------------------------------
Runwait, %executable% %romName%, %emuPath%, Hide UseErrorLevel
if(ErrorLevel != 0){
if (ErrorLevel = 1){
Error = Failed Validity
}else if(ErrorLevel = 2){
Error = Missing Files
}else if(ErrorLevel = 3){
Error = Fatal Error
}else if(ErrorLevel = 4){
Error = Device Error
}else if(ErrorLevel = 5){
Error = Game Does Not Exist
}else if(ErrorLevel = 6){
Error = Invalid Config
}else if(ErrorLevel = 7 || ErrorLevel = 8 || ErrorLevel = 9){
Error = Identification Error
}else{
Error = Mame Error
}
MsgBox Mame Error - %Error%
}
ExitApp
CloseProcess:
KeyWait, Esc, T1
if ErrorLevel
{
Hotkey, %exitEmulatorKey%, Off
send, {p}
Hotkey, %exitEmulatorKey%, On
return
}
else
{
Hotkey, %exitEmulatorKey%, Off
send, {Esc}
Hotkey, %exitEmulatorKey%, On
return
}
i works while olding "esc" button during 2 seconds, but i figure out, can i assign the "p" buton if i push it rapidly? (for pause or select 1/2 eg:for supernes)
because, i've lost 4 buttons on my X-arcade,other solution:
Can i assign esc with combo key like "d" & "i" (start/left) with autohotkey??
i try various script like
#ifWinActive ahk_class Mame
~d & ~i:: send !{f4}
#ifWinActive ahk_class Zsnes
~d & ~i:: send !{f4}
it works fine but i cannot assign this to esc if i try:
#ifWinActive ahk_class Mame
~d & ~i:: send {esc}
so for me 2 solutions:
using esc with safe and one button
using combo for esc (prefered!)
Hope this is cleard, i'm french :)
thx !
After trying to manage esc butons in HL2.0, i failed lol :D
So i try to add in each module this kind of script because my x-arcade have lost 4 buttons...
i need to know 2 things:
i recompile hyperlaunch wit exitemulatorkey = ~esc
in Mame, fine esc dosen't work so i try this kind of code eg For Mame (but it works fine to exit other emulator)
;----------------------------------------------------------------------------
; MAME
; MAME .140
; by BBB
; 1.0
;
; Info:
; Since MAME needs to save hi scores and data on exit, then we can't force
; MAME closed with a hotkey. So make sure you have your own exit key setup
; in MAME first. We will leave the CloseProcess section below blank, but
; it is still required.
;
;----------------------------------------------------------------------------
Runwait, %executable% %romName%, %emuPath%, Hide UseErrorLevel
if(ErrorLevel != 0){
if (ErrorLevel = 1){
Error = Failed Validity
}else if(ErrorLevel = 2){
Error = Missing Files
}else if(ErrorLevel = 3){
Error = Fatal Error
}else if(ErrorLevel = 4){
Error = Device Error
}else if(ErrorLevel = 5){
Error = Game Does Not Exist
}else if(ErrorLevel = 6){
Error = Invalid Config
}else if(ErrorLevel = 7 || ErrorLevel = 8 || ErrorLevel = 9){
Error = Identification Error
}else{
Error = Mame Error
}
MsgBox Mame Error - %Error%
}
ExitApp
CloseProcess:
KeyWait, Esc, T1
if ErrorLevel
{
Hotkey, %exitEmulatorKey%, Off
send, {p}
Hotkey, %exitEmulatorKey%, On
return
}
else
{
Hotkey, %exitEmulatorKey%, Off
send, {Esc}
Hotkey, %exitEmulatorKey%, On
return
}
i works while olding "esc" button during 2 seconds, but i figure out, can i assign the "p" buton if i push it rapidly? (for pause or select 1/2 eg:for supernes)
because, i've lost 4 buttons on my X-arcade,other solution:
Can i assign esc with combo key like "d" & "i" (start/left) with autohotkey??
i try various script like
#ifWinActive ahk_class Mame
~d & ~i:: send !{f4}
#ifWinActive ahk_class Zsnes
~d & ~i:: send !{f4}
it works fine but i cannot assign this to esc if i try:
#ifWinActive ahk_class Mame
~d & ~i:: send {esc}
so for me 2 solutions:
using esc with safe and one button
using combo for esc (prefered!)
Hope this is cleard, i'm french :)
thx !