• 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: Problem with 'to-dos' in iCal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with 'to-dos' in iCal


  • Subject: Re: Problem with 'to-dos' in iCal
  • From: Rob Stott <email@hidden>
  • Date: Sat, 31 Jul 2004 22:17:02 +0100

Thanks for the tip - much appreciated!

r.

On 31 Jul 2004, at 21:56, Paul Berkowitz wrote:

You don't need a repeat loop. iCal is just rife with wonky scripting. This
work, however:

tell application "iCal"
set theCalendar to calendar 1
tell theCalendar
set theToDos to completion date of (every todo where its completion
date > date "Friday, January 1, 1904 12:00:00 AM")
end tell
end tell


It doesn't error either.

--
Paul Berkowitz


From: cheshirekat <email@hidden>
Date: Sat, 31 Jul 2004 14:39:06 -0600
To: AppleScript Users Mailing List <email@hidden>
Subject: Re: Problem with 'to-dos' in iCal

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.
_______________________________________________
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.
_______________________________________________
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.


References: 
 >Re: Problem with 'to-dos' in iCal (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: Problem with 'to-dos' in iCal
  • Next by Date: Re: advanced safari work....
  • Previous by thread: Re: Problem with 'to-dos' in iCal
  • Next by thread: copying data from a relational database
  • Index(es):
    • Date
    • Thread