| QUOTE (jqcc @ Feb 25 2004, 09:52 AM) |
Please do not flame me.....real noobie here trying to do a font/audio exploit per the one I have in EVOX but MXM is better as I can detect whether what is running currently
I am having problems with this command
delete c:\fonts\xbox book.xtf
and rename c:\fonts\xbox book.xtf xbox book.org
What is the correct format
Thanks |
You need to quote the file paths, since there are spaces (otherwise, ActionScript sees several arguments, where you only have one or two)
...and of course, when quoting, you need to "escape" the backslashes by doubling them up. This is only needed when quoting, because MXM reads quoted strings a little differently and the backslash becomes a special character.
delete "c:\\fonts\\xbox book.xtf"
rename "c:\\fonts\\xbox book.xtf" "xbox book.org"
I attach the original mxm.xml and the menu.xml for reference
I am trying to make the system say show install fonthack menu item when c:\morden\audiohack.loc exists
and vice versa only show audiohack menu item when c:\morden\fonthack.loc exists
thanks
<Menu>
<SubMenu>
<Title>Audio Package</Title>
<Item>
<Title>Install Audio Exploit</Title>
<Description>Install Audio Exploit</Description>
<Action>
CallScript InstallPack
</Action>
</Item>
<Item>
<Title>Remove Package</Title>
<Description>Remove Audio Exploit</Description>
<Action>
Callscript RemovePack
</Action>
</Item>
<Item>
<Title>Reinstall ST.DB</Title>
<Description>Reinstall ST.DB if corrupted</Description>
<Action>
Callscript RefreshDB
</Action>
</Item>
</SubMenu>
<SubMenu>
<Title>Games</Title>
<Item>
<AutoDir Flatten="True" Recurse="False">F:\Games</AutoDir>
</Item>
<Item>
<AutoDir Flatten="True" Recurse="False">E:\Games</AutoDir>
</Item>
</SubMenu>
<SubMenu>
<Title>Apps</Title>
<Item>
<AutoDir Flatten="True" Recurse="False">F:\Apps</AutoDir>
</Item>
<Item>
<AutoDir Flatten="True" Recurse="False">E:\Apps</AutoDir>
</Item>
<Item>
<AutoDir Flatten="True" Recurse="False">%_GAMESAVE%Boxplorer</AutoDir>
</Item>
</SubMenu>
<SubMenu>
<Title>Emus</Title>
<Item>
<AutoDir Flatten="True" Recurse="False">F:\Emus</AutoDir>
</Item>
<Item>
<AutoDir Flatten="True" Recurse="False">F:\Emus</AutoDir>
</Item>
</SubMenu>
</Menu>
<Config>
<Main>
<DiscTitle>Media X Menu</DiscTitle>
</Main>
<ActionScript name="AutoExec">
Set _GAMESAVE "E:\\Udata\\21585554\\000000000000\\"
SETFUNC installed FILEEXISTS e:\Morden\install.loc
If %installed% == 1 goto Installed
Quit
:Installed
SETFUNC dbhacked FILEEXISTS E:\Morden\hack.loc
If %dbhacked% == 1 goto finish
delete E:\Tdata\fffe0000\music\st.or
SETFUNC dbexist FILEEXISTS E:\Tdata\fffe0000\music\st.db
If %dbexist% == 0 goto nope
RENAME E:\Tdata\fffe0000\music\st.db E:\Tdata\fffe0000\music\st.or
:nope
COPY E:\Tdata\fffe0000\music\st.hk E:\Tdata\fffe0000\music\st.db
callscript CreateLock E:\Morden\hack.loc
:finish
</ActionScript>
<ActionScript name="GameStub">
SETFUNC dbhacked FILEEXISTS E:\Morden\hack.loc
If %dbhacked% == 0 goto finish
delete E:\Tdata\fffe0000\music\st.db
SETFUNC dbexist FILEEXISTS E:\Tdata\fffe0000\music\st.or
If %dbexist% == 0 goto del
Copy E:\Tdata\fffe0000\music\st.or E:\Tdata\fffe0000\music\st.db
:del
delete E:\Morden\hack.loc
:finish
</ActionScript>
<ActionScript name="InstallPack">
SETFUNC installed FILEEXISTS e:\Morden\install.loc
If %installed% == 1 goto There
Callscript _DisplayMessageBox "Are you sure you wish to install the Audio package?$eol$Press the green button to continue, any other to abort."
If %_GP_A% == "1" GOTO APRESSED
Quit
:APRESSED
MkDir E:\PBL
COPY %_GAMESAVE%boot.cfg E:\PBL\boot.cfg
COPY %_GAMESAVE%bg.jpg E:\PBL\bg.jpg
COPY %_GAMESAVE%font.jpg E:\PBL\font.jpg
COPY %_GAMESAVE%phoenix2d_logo1.jpg E:\PBL\phoenix2d_logo1.jpg
COPY %_GAMESAVE%default.xbe E:\PBL\P.xbe
MkDir E:\PBL\Bioses
COPY %_GAMESAVE%Audio\*.bin E:\PBL\Bioses
MkDir E:\mxm
COPY %_GAMESAVE%mxm\mxm.xml e:\mxm\mxm.xml
COPY %_GAMESAVE%mxm\default.xbe e:\mxm\default.xbe
COPY %_GAMESAVE%mxm\BIOSMD5.xml e:\mxm\BIOSMD5.xml
COPY %_GAMESAVE%mxm\quote.txt e:\mxm\quote.txt
COPY %_GAMESAVE%mxm\BiosMenu.xas e:\mxm\BiosMenu.xas
COPY %_GAMESAVE%Audio\menu.xml e:\mxm\menu.xml
SETFUNC pref FILEEXISTS e:\Udata\00004321\pref.xml
If %pref% == 1 goto nopref
COPY %_GAMESAVE%Audio\pref.xml e:\Udata\00004321\pref.xml
:nopref
SETFUNC dbexists FILEEXISTS E:\Tdata\fffe0000\music\st.db
If %dbexists% == 0 goto dbnotexist
RENAME E:\Tdata\fffe0000\music\st.db E:\Tdata\fffe0000\music\st.or
:dbnotexist
COPY %_GAMESAVE%Audio\st.db E:\Tdata\fffe0000\music\st.db
COPY %_GAMESAVE%Audio\st.db E:\Tdata\fffe0000\music\st.hk
MkDir E:\Morden
callscript CreateLock E:\Morden\lock.loc
callscript CreateLock E:\Morden\hack.loc
callscript CreateLock E:\Morden\install.loc
Callscript _DisplayMessageBox "The package has been installed!"
Quit
:There
Callscript _DisplayMessageBox "Package is already installed!"
</ActionScript>
<ActionScript name="RemovePack">
SETFUNC installed FILEEXISTS e:\Morden\install.loc
If %installed% == 0 goto NotThere
Callscript _DisplayMessageBox "Are you sure you wish to remove the Audio package?$eol$Press the green button to continue, any other to abort."
If %_GP_A% == "1" GOTO Cont
Quit
:Cont
Delete E:\PBL\bg.jpg
Delete E:\PBL\font.jpg
Delete E:\PBL\boot.cfg
Delete E:\PBL\phoenix2d_logo1.jpg
Delete E:\PBL\p.xbe
Delete E:\Morden\lock.loc
Delete E:\Morden\install.loc
Delete E:\PBL\Bioses\4979_67.bin
Delete E:\PBL\Bioses\EvoxM7.bin
Delete E:\mxm\mxm.xml
Delete E:\mxm\default.xbe
Delete E:\mxm\BIOSMD5.xml
Delete E:\mxm\menu.xml
Delete E:\mxm\cache_menu.xml
Delete e:\mxm\quote.txt
Delete e:\mxm\BiosMenu.xas
RmDir E:\PBL\Bioses
RmDir E:\PBL
RmDir E:\mxm
SETFUNC dbexists FILEEXISTS E:\Tdata\fffe0000\music\st.or
If %dbexists% == 0 goto dbnotexist
SETFUNC dbhacked FILEEXISTS E:\Morden\hack.loc
If %dbhacked% == 0 goto dbnothacked
delete E:\Tdata\fffe0000\music\st.db
RENAME E:\Tdata\fffe0000\music\st.or E:\Tdata\fffe0000\music\st.db
goto finish
:dbnothacked
delete E:\Tdata\fffe0000\music\st.or
goto finish
:dbnotexist
Delete E:\Tdata\fffe0000\music\st.db
:finish
Delete E:\Tdata\fffe0000\music\st.hk
RmDir E:\Tdata\fffe0000\music\1499ec
Delete E:\Morden\hack.loc
RmDir E:\Morden
Callscript _DisplayMessageBox "The package has been removed!"
Quit
:NotThere
Callscript _DisplayMessageBox "Package is not installed!"
</ActionScript>
<ActionScript name="RefreshDB">
SETFUNC installed FILEEXISTS e:\Morden\install.loc
If %installed% == 0 goto NotThere
Callscript _DisplayMessageBox "Are you sure you wish to reinstall the ST.db?$eol$Press the green button to continue, any other to abort."
If %_GP_A% == "1" GOTO Cont
Quit
:Cont
SETFUNC dbhacked FILEEXISTS E:\Morden\hack.loc
If %dbhacked% == 1 goto dbhacked
delete E:\Tdata\fffe0000\music\st.or
RENAME E:\Tdata\fffe0000\music\st.db E:\Tdata\fffe0000\music\st.or
goto finish
:dbhacked
delete E:\Tdata\fffe0000\music\st.db
:finish
COPY E:\Tdata\fffe0000\music\st.hk E:\Tdata\fffe0000\music\st.db
callscript CreateLock E:\Morden\hack.loc
Callscript _DisplayMessageBox "The ST.DB has been reinstalled!"
Quit
:NotThere
Callscript _DisplayMessageBox "Package is not installed!"
</ActionScript>
<ActionScript name="CreateLock">
openwrite lockfile %1%
writefile lockfile "lock"
closefile lockfile
</ActionScript>
<ActionScript name="LaunchWithBios">
rename e:\pbl\boot.cfg e:\pbl\boot.org
OpenWrite bootfile e:\pbl\boot.cfg
WriteFileLn bootfile "RC4Key *YAY, SOMEONE ELSE WHO WANTS TO BE BANNED FOR POSTING RC4 KEYS* *RC4 KEYS ARE NOT TO BE POSTED ON XS*"
WriteFileLn bootfile "EEPROMKey1_0 *STUPID PEOPLE SHOULD NOT POST RC4 KEYS* *DO NOT POST RC4 KEYS HERE... YOU CAN BE BANNED FOR THIS*"
WriteFileLn bootfile "EEPROMKey1_1 *YAY, SOMEONE ELSE WHO WANTS TO BE BANNED FOR POSTING RC4 KEYS* *You might get banned for posting this*"
WriteFileLn bootfile "LEDSequence gggg"
WriteFileLn bootfile "Romfile %2%"
WriteFileLn bootfile "Timeout 300000"
WriteFileLn bootfile "Debug false"
CloseFile bootfile
openread QUOTEFILE e:\mxm\quote.txt
readfileln QUOTEFILE QUOTE
closefile QUOTEFILE
OpenWrite autoexec e:\mxm\autoexec.xas
WriteFileLn autoexec "delete e:\\pbl\\boot.cfg"
WriteFileLn autoexec "rename e:\\pbl\\boot.org e:\\pbl\\boot.cfg"
WriteFileLn autoexec "Delete e:\\mxm\\autoexec.xas"
SetFunc EXEVAR Replace "\\" "\\\\" %1%
WriteFileLn autoexec "Exec %QUOTE%%EXEVAR%%QUOTE%"
CloseFile autoexec
exec e:\pbl\p.xbe
</ActionScript>
<ActionScript name="EnableGamestub">
SETFUNC installed FILEEXISTS e:\Morden\install.loc
If %installed% == 0 goto NotThere
SETFUNC entry FILEEXISTS %_GameDir%\MXM_Entry.xml
If %entry% == 1 goto xmlexists
CallScript _DisplayMessageBox "Are you sure you wish to enable the gamestub for this Game?$EOL$Press green to continue, and other button to abort."
If %_GP_A% == "1" GOTO Cont
Quit
:Cont
openread QUOTEFILE e:\mxm\quote.txt
readfileln QUOTEFILE QUOTE
closefile QUOTEFILE
OpenWrite myfile %_GameDir%\MXM_Entry.xml
WritefileLn myfile "$lt$config$gt$"
WritefileLn myfile "$lt$item$gt$"
WritefileLn myfile "$lt$descr$gt$Gamestub Enabled$lt$/descr$gt$"
WritefileLn myfile "$lt$description$gt$Gamestub Enabled$lt$/description$gt$"
WritefileLn myfile "$lt$title$gt$%_GameTitle%$lt$/title$gt$"
WritefileLn myfile "$lt$xbeid$gt$%_GameXBEID%$lt$/xbeid$gt$"
WritefileLn myfile "$lt$verified$gt$%_GameVerified%$lt$/verified$gt$"
WritefileLn myfile "$lt$dir$gt$%_GameDir%$lt$/dir$gt$"
WritefileLn myfile "$lt$media$gt$%_GameMedia%$lt$/media$gt$"
WritefileLn myfile "$lt$thumbnail$gt$%_GameThumbnail%$lt$/thumbnail$gt$"
WritefileLn myfile "$lt$exe$gt$%_GameExe%$lt$/exe$gt$"
setfunc tempvar replace "\\" "\\\\" %_GameExe%
WritefileLn myfile "$lt$action$gt$CallScript Gamestub$eol$Exec %Quote%%tempvar%%QUOTE%$lt$/action$gt$"
WritefileLn myfile "$lt$/item$gt$"
WritefileLn myfile "$lt$/config$gt$"
CloseFile myfile
CallScript _DisplayMessageBox "The GameStub has been enabled for this Game.$EOL$ The system will now reboot and rebuild your menus."
ResetMenuCache
Reboot
:xmlexists
CallScript _DisplayMessageBox "An MXM_Entry.xml already exists for this item. Aborting!"
quit
:NotThere
Callscript _DisplayMessageBox "Package is not installed!"
</ActionScript>
<ActionScript name="RemoveMXMEntry">
SETFUNC installed FILEEXISTS e:\Morden\install.loc
If %installed% == 0 goto NotThere
SETFUNC entry FILEEXISTS %_GameDir%\MXM_Entry.xml
If %entry% == 0 goto xmlnotexists
CallScript _DisplayMessageBox "Are you sure you wish to disable the gamestub or custom BIOS's for this item?$EOL$Press green to continue, and other button to abort."
If %_GP_A% == "1" GOTO Cont
Quit
:Cont
delete %_GameDir%\MXM_Entry.xml
CallScript _DisplayMessageBox "The MXM_Entry.xml has been removed for this item.$EOL$ The system will now reboot and rebuild your menus."
ResetMenuCache
Reboot
:xmlnotexists
quit
:NotThere
Callscript _DisplayMessageBox "Package is not installed!"
</ActionScript>
<ActionScript name="PickBIOS">
SETFUNC installed FILEEXISTS e:\Morden\install.loc
If %installed% == 0 goto NotThere
openread QUOTEFILE e:\mxm\quote.txt
readfileln QUOTEFILE QUOTE
closefile QUOTEFILE
SETFUNC entry FILEEXISTS %_GameDir%\MXM_Entry.xml
If %entry% == 1 goto xmlexists
CallFile BiosMenu.xas
If %_BIOSFILE% == "" goto endhere
OpenWrite myfile %_GameDir%\MXM_Entry.xml
WritefileLn myfile "$lt$config$gt$"
WritefileLn myfile "$lt$item$gt$"
WritefileLn myfile "$lt$descr$gt$BIOS Enabled$lt$/descr$gt$"
WritefileLn myfile "$lt$description$gt$BIOS Enabled$lt$/description$gt$"
WritefileLn myfile "$lt$title$gt$%_GameTitle%$lt$/title$gt$"
WritefileLn myfile "$lt$xbeid$gt$%_GameXBEID%$lt$/xbeid$gt$"
WritefileLn myfile "$lt$verified$gt$%_GameVerified%$lt$/verified$gt$"
WritefileLn myfile "$lt$dir$gt$%_GameDir%$lt$/dir$gt$"
WritefileLn myfile "$lt$media$gt$%_GameMedia%$lt$/media$gt$"
WritefileLn myfile "$lt$thumbnail$gt$%_GameThumbnail%$lt$/thumbnail$gt$"
WritefileLn myfile "$lt$exe$gt$%_GameExe%$lt$/exe$gt$"
setfunc tempvar replace "\\" "\\\\" %_GameExe%
WritefileLn myfile "$lt$action$gt$CallScript LaunchWithBios %Quote%%tempvar%%QUOTE% %_BIOSFILE%$lt$/action$gt$"
WritefileLn myfile "$lt$/item$gt$"
WritefileLn myfile "$lt$/config$gt$"
CloseFile myfile
CallScript _DisplayMessageBox "The Evox BIOS has been enabled for this Game.$EOL$ The system will now reboot and rebuild your menus."
ResetMenuCache
Reboot
:xmlexists
CallScript _DisplayMessageBox "An MXM_Entry.xml already exists for this item. Aborting!"
:endhere
quit
:NotThere
Callscript _DisplayMessageBox "Package is not installed!"
</ActionScript>
</Scripts>
<Context>
<Item Name="Dummy1">
<Mode>HD</Mode>