Re: Problem with 'to-dos' in iCal
Re: Problem with 'to-dos' in iCal
- Subject: Re: Problem with 'to-dos' in iCal
- From: cheshirekat <email@hidden>
- Date: Sat, 31 Jul 2004 14:39:06 -0600
On Sat, Jul 31, 20044:29 PM, the following words from Rob Stott
email@hidden, emerged from a plethora of SPAM ...
>
I'm trying to get a list of every to-do in an iCal calendar which has
>
been completed. As far as I can tell, this should work...
>
>
tell application "iCal"
>
activate
>
set theCalendar to calendar 1
>
tell theCalendar
>
set theToDos to completion date of every todo whose completion date
>
is not missing value
>
end tell
>
end tell
Maybe this piece from a larger script will help.
to getToDos from x
tell application "iCal"
set the cTarget to the first calendar whose title is x
set the ccount to count every todo of cTarget
if the ccount is greater than 0 then
set the tdList to every todo of cTarget
set the targetInfo to ""
repeat with td in the tdList
set the tdInfo to ""
set the tdProps to the properties of td
if the completion date of the tdProps is missing value then
if the due date of the tdProps is not missing value then
set the tdInfo to the tdInfo & "Due: " & (the due date
of the tdProps) & ret
else
set the tdInfo to the tdInfo & "Due: " & "No Due Date" & ret
end if
if the url of the tdProps is not missing value then
set the tdInfo to the tdInfo & "URL: " & (the url of
the tdProps) & ret
else
set the tdInfo to the tdInfo & "URL: " & "No URL" & ret
end if
set the tdInfo to the tdInfo & "Priority: " & (the
priority of the tdProps) & ret
set the tdInfo to the tdInfo & "Summary: " & (the summary
of the tdProps) & ret
set the targetInfo to the targetInfo & ret & tdInfo
end if
end repeat
else
set the targetInfo to false
end if
end tell
return the targetInfo
end getToDos
cheshirekat
--
Alas! all music jars when the soul's out of tune.
- Miguel De Cervantes (1547-1616), Spanish writer. Altisidora, in Don
Quixote, pt. 2, bk. 6, ch. 11 (1615)
* 867 PowerBook G4 * OS X 10.2.8 * 768 MB Ram *
* Addictions: iTunes * AppleScript * Mike's Cards * FileMaker Pro *
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.