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