Script applet for turning on iDVD version 1 themes in iDVD 3

Laine Lee llee at moss.utsa.edu
Tue Nov 4 14:39:47 PST 2003


I think doing this has been talked about before on this list. Here's a
script that will let you do it quick. Paste it into Script Editor and save
as an application, then drag your iDVD 3 folder onto the application.

I'm not sure what the mailing list will do to the line wrap and line concat
symbols, so if you need to, you can download it from here:

http://lonestar.utsa.edu/llee/applescript/iDVD1to3.dmg.sit

--------------

on open f_obj
    if (count of f_obj) > 1 then
        display dialog "You must drag your iDVD folder
            onto this application's icon.
            It must be named \"iDVD 3\"." buttons {"OK"} default button 1
    else
        set this_filepath to f_obj as string
        if this_filepath ends with "iDVD 3:" then
            set path_thme_pt_ls to {"903 Brushed Metal.theme", "912 Happy
Days.theme", ¬
                "905 Photo Album.theme", "914 Surfs Up.theme", "915 Magnetic
Moments.theme", ¬
                "913 Wallpaper.theme", "906 Road Trip.theme", "916 Holiday
Cheer.theme", ¬
                "919 Its A Boy.theme", "901 Portfolio.theme", "909
Leather.theme", ¬
                "910 Burlap.theme", "911 Bon Voyage.theme", "917 A Day to
Remember.theme", ¬
                "902 Sage.theme", "908 Lavender.theme", "907 Wanted.theme",
¬
                "918 Its a Girl.theme"}
            
            set open_file_lang_ls to {"zh_TW.lproj", "Dutch.lproj",
"ko.lproj", "da.lproj", ¬
                "French.lproj", "English.lproj", "no.lproj", "zh_CN.lproj",
¬
                "pt.lproj", "German.lproj", "fi.lproj"}
            
            set tndable to "version</key>" & (ASCII character 13) & (ASCII
character 3) & "<integer>1"
            set trdable to "version</key>" & (ASCII character 13) & (ASCII
character 3) & "<integer>2"
            set rndable to "version</key>" & (ASCII character 10) & (ASCII
character 9) & "<integer>1"
            set rrdable to "version</key>" & (ASCII character 10) & (ASCII
character 9) & "<integer>2"
            
            repeat with path_thme_pt in path_thme_pt_ls
                set theme_part to ¬
                    (this_filepath & ("iDVD.app:Contents:Resources:" & ¬
                        (path_thme_pt & ":Contents:Resources:")))
                
                repeat with i in open_file_lang_ls
                    try
                        set open_file to (theme_part & (i &
":Description.plist"))
                        set versc to (open for access (open_file as alias)
with write permission)
                        set my_fin to read versc
                        set AppleScript's text item delimiters to the
tndable
                        set item_list to every text item of my_fin
                        set AppleScript's text item delimiters to the
trdable as string
                        try
                            set my_fin to item_list as string
                            set AppleScript's text item delimiters to ""
                            set eof of versc to 0
                            write my_fin to versc starting at eof
                        on error errer
                            close access versc
                            display dialog errer
                        end try
                        set AppleScript's text item delimiters to the
rndable
                        set item_list to every text item of my_fin
                   
                        set AppleScript's text item delimiters to the
rrdable as string
                        try
                            set my_fin to item_list as string
                            set AppleScript's text item delimiters to ""
                            set eof of versc to 0
                            write my_fin to versc starting at eof
                        on error errr
                            close access versc
                            display dialog errr
                        end try
                        set my_fin to ""
                        close access versc
                    end try
                end repeat
            end repeat
        else
            display dialog "You must drag your iDVD folder
            onto this application's icon.
            It must be named \"iDVD 3\"." buttons {"OK"} default button 1
        end if
    end if
end open

on run
    display dialog "To use this application, drag your iDVD 3 folder
    onto this application's icon." buttons {"OK"} default button 1
end run

----------------

-- 
Laine Lee
llee at lonestar.utsa.edu
http://lonestar.utsa.edu/llee




More information about the MacDV mailing list