deleting todos in iCal?

Hello,

I’m trying to “expire” Todos in iCal. iCal has a feature to expire events and todos after a certain number of days but I want to expire Todos but not events… In any case, the following script correctly identifies what Todos to delete but doesn’t actually delete them. Does anyone know how to delete a Todo entry in iCal?

Thanks,
Chris Alfeld


set curdate to current date
set keeprange to 16 * days
tell application "iCal"
	set output to ""
	repeat with cal in every calendar
		repeat with tos in every todo of cal
			set sum to summary of tos
			set output to output & sum & ": "
			set todate to completion date of tos
			try
				set delta to curdate - todate
				if delta > keeprange then
					set output to output & "delete"
					delete contents of tos
				else
					set output to output & "keep " & delta
				end if
			end try
			set output to output & "n"
		end repeat
	end repeat
	output
end tell