A new version for sharp XM6 compatible with all version
Opt("WinTitleMatchMode", 1)
;Parsing
Local $count = StringInStr($CmdLineRaw, ".exe", 0 , 1, 1)
local $app = StringLeft ( $CmdLineRaw, $count + 4 )
local $command = StringTrimLeft( $CmdLineRaw, $count + 4 )
if not $command then exit 0
hotkeyset("{esc}", "Terminate")
;Remove "" from game name
$disk1 = StringTrimLeft ( $command, 1 )
$disk1 = StringTrimRight ( $disk1, 1 )
;try to find a second disk
$disk2 = StringReplace($disk1,"Disk 1", "Disk 2")
$disk2 = StringReplace($disk2,"Disk1", "Disk2")
$disk2 = StringReplace($disk2,"Disc 1", "Disc 2")
$disk2 = StringReplace($disk2,"Disc1", "Disc2")
;find correct ini name
local $inifile = "xm6g.ini"
If not FileExists($inifile) then $inifile = "xm6.ini"
If FileExists($disk2) then
Iniwrite($inifile,"MRU0","File0", $disk1)
Iniwrite($inifile,"MRU1","File0", $disk2)
Iniwrite($inifile,"Resume","FD", "1")
Iniwrite($inifile,"Resume","FDI0", "1")
Iniwrite($inifile,"Resume","FDI1", "1")
$command = ""
Endif
;load application
local $PID = Run ( '"' & $app & '" ' & $command )
;set fullscreen
Sleep(500)
Send("!{Enter}")
;waiting loop
While ProcessExists ( $PID )
Sleep(500)
WEnd
;exit
exit 0
;*************************************
;functions
Func Terminate()
Winclose("XM6")
Exit 0
EndFunc
For Atarin800plus 5200 system
1 - Need to uncheck "confirm on exit"
2- this script only work for *.car (because you will have a popup on other type to select cartridge type).
Opt("WinTitleMatchMode", 1)
;Parsing
Local $count = StringInStr($CmdLineRaw, ".exe", 0 , 1, 1)
local $app = StringLeft ( $CmdLineRaw, $count + 4 )
local $command = StringTrimLeft( $CmdLineRaw, $count + 4 )
if not $command then exit 0
HotKeySet("{ESC}", "Terminate")
$PID = Run ( '"' & $app & '" ' & $command )
;waiting loop
While ProcessExists ( $PID )
Sleep(500)
WEnd
;exit
exit 0
;*************************************
;functions
Func Terminate()
Winclose("Atari800Win")
EndFunc