• 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
Re: Can't delete calendar in iCal... [with script this time]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: Re: Can't delete calendar in iCal... [with script this time]
  • From: John M <email@hidden>
  • Date: Wed, 17 Aug 2005 23:39:14 +0100

Hi David,

This works for me, why's another matter:

--
on RemoveEmptyCalendars()
tell application "iCal"
repeat with x from 1 to count of calendars
set myFlag to false
tell calendar x
if ((count events) + (count todos)) = 0 then set myFlag to true
end tell
if myFlag is true then
display dialog ("> " & (name of calendar x) as string) & " events: " & (count events) & ", todos: " & (count todos) giving up after 1
delete calendar x
end if
end repeat
end tell
end RemoveEmptyCalendars
--


Best wishes

John M
_______________________________________________
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: Re: Another iCal Question ... access via id's
  • Next by Date: Re: Vote!
  • Previous by thread: Can't delete calendar in iCal... [with script this time]
  • Next by thread: Mail anamoly
  • Index(es):
    • Date
    • Thread