fritte87
Aktives Mitglied
Thread Starter
- Dabei seit
- 26.06.2012
- Beiträge
- 1.062
- Reaktionspunkte
- 37
Hallo habe folgenes Skript geschrieben um meine Dokuemnte und Bilder auf mein NAS zu sichernÖ
wenn ich das Programm im Apple Script ausführen lasse und danach die Ordner kontrolliere, passt auch alles...allerdings gibt der Apple Script Editor immer einen Fehler yum Schluss...Apple Event liefter Fehler Number1712...anhrnglich nochmal die Antwort des Apple Script Editors.
Vielleicht kann mir jemand helfen die Fehler zu beseitigen?
Code:
set command to "ping -c 1 192.168.1.3"
try
if ((do shell script command) contains " packets received, 0.0% packet loss") then
mount volume "afp://192.168.1.3/Sicherung Tim/"
tell application "Finder"
try
do shell script "rsync -au --delete --exclude=Parallels/ /Users/Fritte/Documents/ /Volumes/'Sicherung Tim'/rsync/Documents"
end try
end tell
end if
end try
delay 10
tell application "Finder"
try
do shell script "rsync -au --delete /Users/Fritte/Pictures/ /Volumes/'Sicherung Tim'/rsync/Pictures"
end try
try
-- Netzlaufwerk trennen
eject disk "Sicherung Tim"
end try
delay 10
display dialog "Sicherung wurde erstellt"
end tell
wenn ich das Programm im Apple Script ausführen lasse und danach die Ordner kontrolliere, passt auch alles...allerdings gibt der Apple Script Editor immer einen Fehler yum Schluss...Apple Event liefter Fehler Number1712...anhrnglich nochmal die Antwort des Apple Script Editors.
Code:
tell current application
do shell script "ping -c 1 192.168.1.3"
--> "PING 192.168.1.3 (192.168.1.3): 56 data bytes
64 bytes from 192.168.1.3: icmp_seq=0 ttl=64 time=0.292 ms
--- 192.168.1.3 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.292/0.292/0.292/0.000 ms"
end tell
tell application "AppleScript Editor"
mount volume "afp://192.168.1.3/Sicherung Tim/"
--> file "Sicherung Tim:"
end tell
tell application "Finder"
do shell script "rsync -au --delete --exclude=Parallels/ /Users/Fritte/Documents/ /Volumes/'Sicherung Tim'/rsync/Documents"
--> error number -10004
end tell
tell current application
do shell script "rsync -au --delete --exclude=Parallels/ /Users/Fritte/Documents/ /Volumes/'Sicherung Tim'/rsync/Documents"
--> ""
end tell
tell application "Finder"
do shell script "rsync -au --delete /Users/Fritte/Pictures/ /Volumes/'Sicherung Tim'/rsync/Pictures"
--> error number -10004
end tell
tell current application
do shell script "rsync -au --delete /Users/Fritte/Pictures/ /Volumes/'Sicherung Tim'/rsync/Pictures"
--> ""
end tell
tell application "Finder"
eject disk "Sicherung Tim"
--> error number 0
display dialog "Sicherung wurde erstellt"
Ergebnis:
error "„Finder“ hat einen Fehler erhalten: AppleEvent lieferte eine Zeitüberschreitung." number -1712
Vielleicht kann mir jemand helfen die Fehler zu beseitigen?