[Windows Mobile Themes] twolf:
Bad news.... :(

I've been doing some tests and the older themes sometimes mess up my M2D, even without the XML...

I'm leaving here the scripts I already made in Mortscript, in case anyone wants to pick up from here and start to concentrate on the new .m2Dr skin files.

These scripts can be placed anywhere for use, just create a THEMES folder in the same place where they are (with some themes inside it, hehehe).

For now it should also work on .m2dct files, but since it messes up M2D I removed the REPLACE FILES option.

This is only a test, of course, the M2Dr will use it in the background to refresh the themes list, change the themes path and installing a theme.

refresh_themes.mscr (creates a theme list and extracts the thumbnail from them for later use)

ShowWaitCursor
path = SystemPath("ScriptPath") & "\"
themes_counter = 1

if (fileExists (path & "ThemesList.txt"))
Delete(path & "ThemesList.txt")
Delete(path & "MortThemesList.ini")
DelTree(path & "Themes\Thumbs" )
else
MkDir(path & "Themes\Thumbs")
endif

ForEach xfiles in files (path & "Themes\*.*")
this_theme_name = Part( xfiles , path & "Themes\", -1, 0 )
# The first list is for the M2Dr Flash, so that it can handle the variables, the other is for the Mortscript "install theme" script
IniWrite( path & "FlashThemesList.txt", myThemes ,("&theme" & themes_counter), this_theme_name & "&END")
IniWrite( path & "MortThemesList.ini", myThemes ,(themes_counter),'"' & this_theme_name & '"')
themes_counter = themes_counter + 1
EndForEach
IniWrite( path & "FlashThemesList.txt", myThemes ,"&Total_list", themes_counter & "&END")

currentfilename = 1
While(currentfilename < themes_counter)
this_file = IniRead( path & "MortThemesList.ini", myThemes , currentfilename)
xname = Part( this_file , ".", -2, 0 )
xextension = Part( this_file , ".", -1, 0 )
Rename(path & "Themes\" & this_file , path & "Themes\" & xname & ".zip")
UnzipFile( path & "Themes\" & xname & ".zip", "preview.jpg", path & "Themes\thumbs\" & xname & ".jpg")
Rename(path & "Themes\" & xname & ".zip" , path & "Themes\" & this_file )
currentfilename = currentfilename + 1
EndWhile

HideWaitCursor

install_theme.mscr (installs the theme chosen from the list)

ShowWaitCursor
path = SystemPath("ScriptPath") & "\"

# This part will be handled by the M2Dr flash chooser, but you can change this number manually below #
# selected_theme_number = RegRead( "HKLM","\Software\M2Dr\","selected_theme_number")
selected_theme_number = "1"

if (selected_theme_number eq false)
Message ("No theme selected!","Warning")
KillScript( "install_theme.mscr" )
endIf

Mkdir (path & "Themes\temp" )

install_this_theme = IniRead( path & "MortThemesList.ini", myThemes , selected_theme_number
xname = Part( install_this_theme , ".", -2, 0 )
xextension = Part( install_this_theme , ".", -1, 0 )

Rename(path & "Themes\" & install_this_theme , path & "Themes\" & xname & ".zip")
UnzipAll( path & "Themes\" & xname & ".zip", path & "Themes\temp" )

if ( xextension eq "m2dct")
if (fileExists (path & "Themes\temp\skin\HTCHomeSettings.xml"))
Delete(path & "Themes\temp\skin\HtcHomeSettings.xml")
endif
endif

Move (path & "Themes\temp\skin\*.*", "\Windows" ,TRUE)
Rename (path & "Themes\" & xname & ".zip" , path & "Themes\" & install_this_theme)
DelTree (path & "Themes\temp" )

Kill("\windows\manila2d.exe")
Run("\windows\manila2d.exe")
HideWaitCursor