the following script worked in 10.4 and 10.5, but no longer in 10.6:
any suggestions?
set currentDate to (current date) tell application "iCal" set curICalToDo to todo 1 of calendar 1 try set toDoProperties to {start date:currentDate} if exists due date of curICalToDo then set toDoProperties to toDoProperties & {due date:(due date of curICalToDo)} if exists priority of curICalToDo then set toDoProperties to toDoProperties & {priority:(priority of curICalToDo)} if exists completion date of curICalToDo then set toDoProperties to toDoProperties & {completion date:(completion date of curICalToDo)} if exists url of curICalToDo then set toDoProperties to toDoProperties & {url:(url of curICalToDo)} if exists sequence of curICalToDo then set toDoProperties to toDoProperties & {sequence:(sequence of curICalToDo)} if exists stamp date of curICalToDo then set toDoProperties to toDoProperties & {stamp date:(stamp date of curICalToDo)} set toDoProperties to toDoProperties & {summary:"summary2make"} set toDoProperties to toDoProperties & {description:"description2make"} make new todo at end of todos of calendar 1 with properties toDoProperties on error errorMessage return errorMessage end try end tell
Gives the error: "iCal got an error: Can’t make {start date:date \"Thursday, September 3, 2009 8:48:13 PM\", due date:date \"Thursday, September 3, 2009 12:00:00 AM\", priority:high priority, url:\"HTTP:HOMEPAGE/MAC.COM\", sequence:5, stamp date:date \"Thursday, September 3, 2009 8:41:39 PM\", summary:\"summary2make\", description:\"description2make\"} into type properties of todo." |