Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A fix for iCal scripts running from cloned drives Apps
I have several scripts I run at 5:00AM on various days that are started by iCal. I also have three hard drives on my Mac Pro, where DISK2 and DISK3 are clones of DISK1, created using SuperDuper.

Once a month, I verify all three of my disks. To verify DISK1, I will usually restart from DISK2 or DISK3. When I do this, even though it is long past 5:00AM, iCal will launch my scripts. This can foul things up, as all my scripts use absolute paths starting at DISK1.

I inserted the following bit of AppleScript at the beginning of all my scripts to avoid this problem:
tell application "Finder"
  activate
  set dtest to name of startup disk
  if dtest = "DISK2" then return
  if dtest = "DISK3" then return
end tell
This essentially quits the script before causing any problems.
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[2,918 views]  

A fix for iCal scripts running from cloned drives | 0 comments | Create New Account
Click here to return to the 'A fix for iCal scripts running from cloned drives' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.