Like that ?
HotKeySet("{ESC}", "Terminate")
$path = "F:\Jeux PC [Downloads]\Emulation\mame0149b\"
$app = "mame.exe"
If $CmdLine[0] > 0 Then
$PID = Run( $path & $app & ' -rompath' & $CmdLineRaw, $path)
While 1
Sleep(100)
WEnd
EndIf
Func Terminate()
While ProcessExists ( $PID )
ProcessClose ( $PID )
WEnd
Exit 0
EndFunc
Mame give me the following error :
Error: unknow option: -rompath-rompath