• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Can't delete calendar in iCal... [with script this time]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't delete calendar in iCal... [with script this time]


  • Subject: Can't delete calendar in iCal... [with script this time]
  • From: David Crowe <email@hidden>
  • Date: Wed, 17 Aug 2005 10:38:59 -0600

Title: Can't delete calendar in iCal... [with script this time]
The following script runs without errors, and the "display dialog" shows the expected information ... but no calendars are deleted!

Can anyone explain why? Or, even better, explain how to make it work.

RemoveEmptyCalendars()

on RemoveEmptyCalendars()
tell application "iCal"
       
               
repeat with aCalendar in every calendar
               
tell aCalendar
                         
if ((count events) + (count todos)) ¾ 0 then
                                   
display dialog ("> " & (name of aCalendar) as string) & " events: " & (count events) & ", todos: " & (count todos) giving up after 1
                                   
delete aCalendar
                               
end if
                 
end tell
               
end repeat
     
end tell
end RemoveEmptyCalendars

Thanks,
    David Crowe
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Changing Preferences
  • Next by Date: Mail anamoly
  • Previous by thread: Changing Preferences
  • Next by thread: Re: Can't delete calendar in iCal... [with script this time]
  • Index(es):
    • Date
    • Thread