Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Export iCal To Do items to OmniOutliner' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Export iCal To Do items to OmniOutliner
Authored by: hizbiz79 on Aug 17, '08 12:57:59PM

Here are a few additions to the script

1. only prints none completed tasks
2. when creating a task in a new row in OO it inherits the color of calendar

I am having an issue with calenders that are listed first in a calendar group, when created in OO they don't inherit the color of the calendar

here it is any help is appreciated:

set theCals to {}
set theTodos to {}

tell application "OmniOutliner Professional"
activate
set doc_ID to make new document

tell application "iCal"
set theCals to calendars
set i to 1
repeat with a_Cal in theCals
set calTitle to title of calendar i
set cnt to count of todos of calendar i
set calcolor to color of calendar i
if cnt > 0 then
my newRow(doc_ID, calTitle, calcolor, false)
repeat with aTD in todos of a_Cal
set TD_name to summary of aTD
set bob to completion date of aTD
try
bob
on error
my newRow(doc_ID, TD_name, calcolor, true)
end try
end repeat
end if
set i to i + 1
end repeat
end tell
end tell

on newRow(doc_ID, txt, clr, flIndent)
tell application "OmniOutliner Professional"
set z to make with properties {topic:txt} new row at end of doc_ID
set color of topic of z to clr
if flIndent then
set z to last row of doc_ID
indent z
end if
end tell
end newRow



[ Reply to This | # ]