Hi All,
I notice a strange behaviour.
From iCal dictionary I read that there isn’t a status property among the properties of todo class.
But if I put the flag on the check-box “completed” of a todo and then I edit the “corestorage.ics” file of my calendar I find a row called “STATUS:COMPLETED”.
Among the properties of an event there is a status one and the value are: cancelled, confirmed, none e tentative.
This status property has nothing to do with the status “completed” of a todo.
How can I set the check-box “completed” in a todo or can I get the status of this check-box ?
Please let me know the exact syntax…I’m going mad…
Just this morning I wrote a quick&dirty script to list all to do’s, which are not yet completed.
I figured out, that if completion date (and also due date) has no value, it is complete empty, even if you assign a variable
with an empty completion date, you get NOTHING (I assume, that’s a bug).
This makes it impossible to assign an empty value or missing value or “” to completion date
The only way to get the data is to throw a couple of errors.
Here is the script, if you are interested in:
tell application "iCal"
set todolist to "Unerledigte Aufgaben" & return & return
repeat with i in every calendar
if (count todos of i) > 0 then
repeat with ii in todos of i
try
completion date of ii is missing value
on error
try
set dd to due date of ii
set dd to short date string of dd & " " & hours of dd & ":" & minutes of dd
if character -2 of dd is ":" then set dd to dd & "0"
on error
set dd to tab & tab & tab
end try
set todolist to todolist & summary of ii & tab & dd & tab & description of ii & return
end try
end repeat
end if
end repeat
end tell
tell application "TextEdit"
if not (window 1 exists) then make new document
set text of document 1 to todolist as Unicode text
end tell
this is interesting to get different results addressing the properties record and the property directly.
As written before I guess that’s a bug. And setting it doesn’t work neither