16
General Discussion & Help / Re: Mame Roms not launching via .Bat file
« on: June 21, 2017, 05:43:21 PM »Glad to see you got your .bat file working. Here is ahk code in case you are curious.Code: [Select]#Persistent
mameEXE := A_ScriptDir "\mame64.exe" ;path to mame64.exe
RunWait, %mameEXE%,,, MAME_PID ;RunWait will wait until the program finishes before continuing
Exitapp
Joy9::
KeyWait, Joy9, T2 ;wait 2 seconds for release key
if (ErrorLevel) ;more than 2 sec have passed
Process, Close, %MAME_PID% ;close MAME using the Process ID we got from the RunWait command
return
I've tried this in a standalone ahk exe so far and it executes mame just fine. Can you incorporate the passing of the rom file into the code too please? I think you mentioned earlier that its %1 or %1%.
Thanks.