Ical - Delete Events per Day

Hi,

can someone please tell me, how I am able to delete Events per Day:

f.ex: How can I delete all events which are entered on every Saturday? (The Events are not in a row…)

Thanks for your assistence…

br,

stefan

stefan:

This is a bit clunky, but it seems to work for any event that starts on a Saturday, even if it repeats. Of course, if another event starts on a different date, and one of the repeats is on a Saturday, this does not delete the repeating event on a Saturday.

set xx to {}

tell application "iCal"
	set ae_Rob to every event of calendar "Rob"
	repeat with aer in ae_Rob
		set end of xx to {(aer's start date), (aer's uid)}
	end repeat
	set answer to my GetSaturdayUIDS(xx)
	repeat with question in answer
		tell calendar "Rob" to delete (every event whose uid is question)
	end repeat
end tell


on GetSaturdayUIDS(event_List)
	set sat_uid_List to {}
	repeat with eL in event_List
		if (eL's item 1)'s weekday is Saturday then
			set end of sat_uid_List to eL's item 2
		end if
	end repeat
	return sat_uid_List
end GetSaturdayUIDS

Good luck,