DropSync AppleScript 1708 Error

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

DropSync AppleScript 1708 Error Thu May 31, 2012 1:34 pm • by La_Tristesse
I do know that Hazel has built in syncing capabilities. but I like to use DropSync because it provides such a great gui for conflicts. Anyway, I set up a applescript which triggers a backup of my external hdd to another external hdd. The script runs fine outside from Hazel but won't get executed from the rules without an error.

Code: Select all
2012-05-31 19:15:42.609 hazelworker[3253] Processing folder Volumes
2012-05-31 19:15:44.624 hazelworker[3253] TOSHIBA_DECRYPTED: Rule Start DropSync On Mount matched.
2012-05-31 19:15:44.787 hazelworker[3253] [Error] AppleScript failed: Error executing AppleScript /Users/tristank/Documents/Scripts/applescripts/dropsync_toshiba_backup.scpt on file /Users/tristank/Volumes/TOSHIBA_DECRYPTED.
2012-05-31 19:15:44.787 hazelworker[3253] AppleScript error: {
    OSAScriptErrorNumberKey = "-1708";


The AppleScript:

Code: Select all
(* Running a sync using DropSync and Applescript
Demonstrates how to launch DropSync, select a synced place for syncing, and then run a sync.
DropSync supports much more applescript functionality than is demonstrated here.

Consult the DropSync.sdef file for complete details.

To use this script you will need to modify it to reflect your own setup.
The Applescript Editor utility can be used to run, edit and debug your scripts.

The script can then be run from terminal using the osascript command,
or can be automatically launched by linking it to a recurring event in iCal.
*)

tell application "DropSync"
   launch
   
   (* Select the synced place (store) the you want to sync by using its name *)
   set currentStore to store named "toshiba_backup"
   
   (* Initiate the sync in the desired direction *)
   sync currentStore direction Upward
   
   (* All the steps below are only required if you want to wait
   for the sync to complete and quit DropSync when the sync is finished *)
   set timeused to 0
   set timeoutsecs to 7200 -- 2 hours
   
   (* Poll every 10 seconds to see if we are complete *)
   repeat until syncing of currentStore is equal to false or timeused > timeoutsecs
      delay 10
      timeused = timeused + 10
   end repeat
   
   (* Tell Dropsync to quit if it is finished the sync *)
   if syncing of currentStore is equal to false then quit
   
end tell


If there is something wrong with the AppleScript, please be patient with me, because this are my first steps.

Regards

Tristan
La_Tristesse
 
Posts: 18
Joined: Sun Mar 21, 2010 4:42 pm

Re: DropSync AppleScript 1708 Error Thu May 31, 2012 4:48 pm • by Mr_Noodle
Is this script embedded in Hazel or in an external script? Did you read the help on AppleScript? If you are using an external script, you need to wrap it in a handler. The help has a template you can use.
Mr_Noodle
Site Admin
 
Posts: 11257
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: DropSync AppleScript 1708 Error Thu May 31, 2012 5:16 pm • by La_Tristesse
It's a external script. What is a handler? You mean the hazel help page?
La_Tristesse
 
Posts: 18
Joined: Sun Mar 21, 2010 4:42 pm

Re: DropSync AppleScript 1708 Error Fri Jun 01, 2012 2:53 pm • by Mr_Noodle
An AppleScript handler. Check the help. It's explained there.
Mr_Noodle
Site Admin
 
Posts: 11257
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support