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


Click here to return to the 'Export iCal To Do items to OmniOutliner (update)' 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 (update)
Authored by: Robert Black on Dec 14, '03 08:58:29AM
I updated the code slightly so that calendars with zero todos are not included in the outline.

set theCals to {}
set theTodos to {}

tell application "OmniOutliner"
	activate
	set doc_ID to make new document
	set isStatusVisible of doc_ID to false
	set topic of row 1 of doc_ID to "Master todo list"
	
	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
			if cnt > 0 then
				my newRow(doc_ID, calTitle, false)
				
				repeat with aTD in todos of a_Cal
					set TD_name to summary of aTD
					my newRow(doc_ID, TD_name, true)
				end repeat
			end if
			set i to i + 1
		end repeat
	end tell
end tell

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


[ Reply to This | # ]
Export iCal To Do items to OmniOutliner (update)
Authored by: hatchethead on Aug 10, '04 11:35:43AM

Ok, this script is good at doing what it's supposed to do. Now, who can modify this baby to do the following:
(1) report the date on which a to do was completed
(2) limit the report to a range of dates

Such a script would be a wonderful addition to my script collection, and would make iCal a useful app.



[ Reply to This | # ]
Export iCal To Do items to OmniOutliner (update)
Authored by: hatchethead on Aug 10, '04 11:58:02AM

Check this out, too:

http://discussions.info.apple.com/webx?14@249.DJPFa1M5tRm.12@.6896df10/3



[ Reply to This | # ]
Export iCal To Do items to OmniOutliner (update)
Authored by: mstar on Jun 10, '05 04:06:15PM

I am a real newbie to AppleScript, but am REALLY in need of exporting all
my todos.

When I run your script in the editor I get this Error:
Syntax Error
Espected end of line, etc. but found identifier. (then highlights the letter z)

Help?



[ Reply to This | # ]