defaults read/write

Atalantia

Atalantia

Aktives Mitglied
Thread Starter
Dabei seit
26.11.2009
Beiträge
1.894
Reaktionspunkte
432
Hallo,
ich versuche ein Script zu erstellen, dass die Präferenzen von ".GlobalPreferences.plist" von einem Backup File einliest und ins default schreibt. Der Ansatz dazu sieht so aus, funktioniert aber nicht:
Code:
set var to choose file of type "com.apple.property-list" with prompt "Choose the plist to read in defaults." invisibles yes default location path to preferences folder
tell application "System Events"
    set fiNam to name of var
end tell
set readOut to (do shell script "defaults read " & POSIX path of var & space & "NSUserReplacementItems")
set writePath to POSIX path of (path to home folder) & "Library/Preferences/" & fiNam as string
do shell script "defaults write " & writePath & space & "NSUserReplacementItems " & readOut
Es gibt die Fehlermeldung aus:
Code:
...    --> error "sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `d...
Weiss jemand wie das geht?
 
Zurück
Oben Unten