Shirt Pocket Discussions  
    Home netTunes launchTunes SuperDuper! Buy Now Support Discussions About Shirt Pocket    

Go Back   Shirt Pocket Discussions > SuperDuper! > General

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-08-2007, 06:22 AM
snoopy1967 snoopy1967 is offline
Registered User
 
Join Date: May 2007
Posts: 2
applescript not working any more after upgrade

I've been using the following applescript, in order to do an automated backup whenever i plug in my external firewire disk.
[For the curious: the script gets run by 'peripheral vision".]

The problem now is that the script produces an error in SD (something about the event ..)

Can anyone tell me how to modify the script to make it run again?


Thanks a lot in advance.

Best regards,
Gabriel.



Here is the applescript:


-- allBackupSettings should contain the names of all saved SuperDuper! backup settings to cycle through
-- any external volumes referenced in the saved backup settings used should be mounted before running this script
property allBackupSettings : {"incr1", "incr2"}

-- backupSettings will retain the name of the backup settings used for the last successfully completed backup
property backupSettings : ""

-- set new backup settings to use, cycling through the list of saved settings
set previousBackupSettings to backupSettings
if backupSettings is "" or backupSettings is last item of allBackupSettings then
set backupSettings to first item of allBackupSettings
else
repeat with i from 1 to (count allBackupSettings)
if backupSettings is item i of allBackupSettings then
set backupSettings to item (i + 1) of allBackupSettings
exit repeat
end if
end repeat
end if

-- sleep a few seconds to allow OS to properly mount the external volume
-- (reason: i set up Peripheral Vision to automatically start this script
-- as soon as it has detected that the external HD was connected)
tell application "System Events" to do shell script "sleep 3"

tell application "SuperDuper!"
try
--Wait until SuperDuper! is idle before loading and running the desired session
repeat while status is not idle
--Sleep # seconds is the best way to "wait" without using the CPU
tell application "System Events" to do shell script "sleep 5"
end repeat
if status is idle then
--Specify the saved settings as either an absolute path or just the name
«event SDprRunn» without «class noUI» given «class fIlE»:backupSettings
end if
--Wait until the session is done
repeat while status is running
tell application "System Events" to do shell script "sleep 3"
end repeat
on error errMsg
-- backup failed, so restore saved backup settings last used
-- N.B. backup stopped by user is considered successful by SuperDuper in this context
set backupSettings to previousBackupSettings
display dialog errMsg & " See section 12 of the User's Guide for help with this script."
end try
--Once done, tell SuperDuper to quit
quit
end tell
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SD is working great! denke General 1 10-02-2006 08:55 AM
A strategy for managing SD! jobs via AppleScript Syzygies General 15 05-01-2006 07:55 AM
Problems automating backups with applescript and crontab kbradnam General 4 01-20-2006 07:40 AM
Upgrade problem mikel General 11 11-24-2005 12:53 PM
applescript help snoopy67 General 1 09-17-2005 09:07 AM


All times are GMT -4. The time now is 04:57 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.