Thread: Scripts
View Single Post
  #4  
Old 03-15-2006, 07:24 PM
MarkW19 MarkW19 is offline
Registered User
 
Join Date: Mar 2006
Posts: 19
OK, I've had a good look around, and I've played around with some scripts to get one that actually complies ok with no errors.

I thought this one would work, but it doesn't. Can anyone tell me where I've gone wrong? The partition I want to mount is called Backup, and according to Disk Utility it's disk identifier is disk0s5, so I put that into the script...

=====
-- SuperDuper! scheduled copy script template (c) 2005-2006 by Bruce Lacey. Published by Shirt Pocket.
-- Script by Dave Nanian and Bruce Lacey

on beforeRunningCopy()
tell application "Finder"
if not (exists the disk Backup) then
do shell script "diskutil mount `disktool -l | grep 'Backup' | sed 's/.*\\(disk0s5*\\).*/\\1/'`"
delay 1
end if
end tell

delay 2
end beforeRunningCopy

on afterRunningCopy()
tell application "Finder"
if (exists the disk "Backup") then
eject "Backup"
delay 2
end if
end tell

delay 2
end afterRunningCopy
Reply With Quote