View Single Post
Quote:
Originally Posted by imlad View Post
John, I would love to see your scripts - are they posted anywhere? What I thought of doing is something like what you describe (am getting into using AppleScript for personal purposes). My thought was to have a checkbox column that will indicate that a particular line is a task. Once in OF for the Mac, the script could be run and have a selection formula to run only against the rows that have the task checbox checked. Once the task is generated in OF, I would grab the URI and stick it in the OO row (either in a column of its own or maybe appending it to the Note section, so that I could refer from the OO row to the OF task).

Regards!
Here you go:

Code:
tell front document of application "OmniOutliner Professional"
	-- set theDoc to front document
	--set columnCount to count of columns of theDoc
	
	set theList to the selected rows
	set theCount to (count of selected rows)
	if theCount < 1 then
		display dialog "You need to select at least one row to use this script." buttons "Cancel" default button "Cancel"
	end if
	
	-- go through each selected row in OmniOutliner and then create a corresponding
	-- action in the quick entry box of OF
	
	set actionText to ""
	repeat with i from 1 to theCount
		
		
		set actionText to (get topic of item i of selected rows)
		
		-- create a new action in Omnifocus QuickEntry window
		
		tell application "OmniFocus"
			-- create new action
			tell quick entry
				open
				set NewTask to make new inbox task with properties {name:actionText}
			end tell
		end tell
	end repeat
end tell
How this works:

Put this script in your scripts folder for OmniOutliner Pro. Open an outline and then highlight the rows that you want to become actions in OF. Invoke the script from the scripts menu in your finder bar. The quick entry window will pop up with a line for each action. Add the contexts and dates and save.

Note, you can select a discontinuous selection of rows in OO by using the command key in concert with clicking. Shift clicking gets continuous selections of rows.

At some point, I'm going to add a section where this looks for a column called "due" and puts that in as the due date. I might do the same thing for contexts at some point. Right now, this works pretty well and makes very short work of setting up the actions.

J.