Heck, why not just copy the whole file: do shell script "cp -fp ~/Library/Preferences/com.apple.dock.plist /tmp/" ... for the backup part, and do the reverse for restore: do shell script "cp -fp /tmp/com.apple.dock.plist ~/Library/Preferences/" [there are basic AppleScript equivalents that could do as well without a "do shell script" statement.]

All that's needed is to display dialog asking whether we're doing a backup or a restore. If it's a restore, we need to kill the running dock (or maybe quite Finder with: ignoring application responses tell application "Finder" to quit -- do the reverse copy from /tmp to prefs/ -- and resurrect Finder with: tell application "Finder" to activate ). Some "delay 2" statements may need to be sprinkled strategically within that block... but that's about 90% of the task there (i think).

edit: i guess the restore routine should check that a backup file exists... else tell the user: "too late dude, no backup found... would you like to backup now instead?"

Last edited by Hal Itosis; 02/06/10 05:51 AM.