Author Topic: (Solved) Exit from openBOR?  (Read 2036 times)

manzarek

  • Sr. Member
  • ****
  • Posts: 147
    • View Profile
    • YouTube
(Solved) Exit from openBOR?
« on: March 07, 2021, 09:57:58 AM »
This code works, but with a small flaw when you launch a game immediately after it returns to attract mode, but with the game still open, then when you click the exit button the game closes, but while the game is running attract mode continues work below, I don't know if I have explained myself well, does it do it to you too?
 wait_for_ESC.exe
Code: [Select]
#include <Misc.au3>

While 1
If _IsPressed ("1B") Then
ProcessClose("OpenBOR.exe")
;MsgBox(0, '', "Button pushed")
Exit
EndIf
WEnd

> OpenBOR

executable           cmd
args                 /c cd C:\attract\EMU\OpenBOR\[name] & start OpenBOR.exe & start C:\attract\EMU\OpenBOR\wait_for_ESC.exe
rompath              C:\attract\EMU\OpenBOR
romext               <DIR>
system               Arcade
info_source          thegamesdb.net
nb_mode_wait         3
exit_hotkey          Escape

NOTE: ESC-Key of AM doesn't work. So you need an external program like an autoit-script. Create wait_for_ESC.au3 and compile this sourcecode to .exe:
« Last Edit: March 08, 2021, 06:33:55 AM by manzarek »
Mame Fighting

manzarek

  • Sr. Member
  • ****
  • Posts: 147
    • View Profile
    • YouTube
Re: Exit from openBOR?
« Reply #1 on: March 08, 2021, 06:33:15 AM »
Solved the exit button works even without the mess that was written.http://forum.attractmode.org/index.php?topic=503.msg4231#msg4231
« Last Edit: March 08, 2021, 06:36:41 AM by manzarek »
Mame Fighting