| CODE |
;########################################################### ;# Name: Skin Switcher ;# Author: flattspott ;# Date: 03-29-2004 ;# Version: 0.2 ;# FileName: SkinSwitcher.xas ;# ;# Disclaimer: ;# This is a WIP script only (Tested and made with the 1191 Build) ;# ;# Purpose: ;# Will create a list of all your skins (not the internal ones) and step though the list ;# on bootup each time, setting your skin to the next one in the list ;# ;# Installation: ;# Upload SkinSwitcher.xas file to your Xbox,(into your scripts folder) ;# then add something like this somewhere in your MXM.xml. ;# $ActualPath$ is where MXM starts from. ;# Also note that below I have the xas file inside a subfolder from the main scripts folder ;# This is a personal preference, change it if need be. ;# ;# ;# ;# CallFile $ActualPath$\Scripts\SkinSwitcher\SkinSwitcher.xas ;# ;# ;############################################################ Set Temp 0 Set SkinList E:\UDATA\00004321\skinlist.xml :LookUp XMLOpen SomeXML ::MXM XMLGetValue SomeXML spName !.Main^SkinsPath SetFunc sPath FileExists %spName% If# %sPath% == 0 Goto Error If# %sPath% == 1 Goto Begin :Begin SetFunc Used FileExists %SkinList% If# %Used% == 0 Goto New If# %Used% == 1 Goto Old :New XMLCreate RandomXML Main XMLSetValue RandomXML !.Status^LastSkin "0" Goto Search :Old XMLOpen RandomXML %SkinList% XMLGetValue RandomXML Current !.Status^LastSkin Add Current 1 XMLClose RandonXML XMLCreate RandomXML Main XMLSetValue RandomXML !.Status^LastSkin "%Current%" Goto Search :Search BeginSearch %spName%\* :StartSearch SEARCHTYPE s_type SEARCHITEM s_name IF "%s_name%" == "" Goto DoneSearch IF %s_type% == "dir" Goto ListSkin IF %s_type% == "file" Goto SearchContinue :SEARCHCONTINUE SEARCHNEXT GOTO STARTSEARCH :ListSkin SetFunc SkinName Replace %spName% "" %search_name% XMLSetValue RandomXML !.Skins.Skin:%Temp%~Name "%SkinName%" Add Temp 1 Goto SearchContinue :DoneSearch ENDSEARCH Goto Finish :Error MsgBox "Skin Switcher can't find:$eol$%spName%$eol$Please make sure it exists" 0 3500 Goto End :Finish XMLSetNodePtr RandomXML !.Skins XMLGetNodeCount RandomXML Count If %Current% == %Count% Goto New XMLGetValue RandomXML NextSkin !.Skins.Skin:%Current%~Name XMLOpen SkinXML %spName%\%NextSkin%\MXM_Skin.xml XMLGetValue SkinXML RealName !~name XMLClose SkinXML XMLOpen PrefXML ::Prefs XMLSetValue PrefXML !.UserSetting^Skin "%RealName%" XMLSave PrefXML ::Prefs MsgBox "When you reboot your skin will be$eol$%RealName%" 0 2000 XMLSave RandomXML %SkinList% XMLClose RandomXML XMLClose SomeXML XMLClose PrefXML :End Quit |