View Single Post
Quote:
Originally Posted by RobTrew View Post
I would probably use Sqlite to do this - designing an SQL query that fetches the list you want.
Thanks RobTrew! However I realised when I went away and put my sensible head on that what I wanted was actually a lot simpler than I realised. I went away and created a 'Now' perspective in Omnifocus that did exactly what I want: View Contexts remaining, ungrouped and sorted by context where availability is Available Status is Any Status and Duration is Any Duration.

I then used a nice simple script (below) that I found by Ian McCracken to export the tasks from that context to Geek Tool. I even managed to customise the script so the list organised neatly with bullets!

It's not perfect, since it does seem to change your Omnifocus view to that perspective whether you are doing something else in Omnifocus at the time or not. However for my purposes, that's an acceptable payoff for ease of use.

Anyone could use this script for any preferred perspective by replacing the line

Code:
set perspective name to "Now"
with
Code:
set perspective name to "<your perspective here>"
If you want the brackets at the end to show project rather than context, change

Code:
set projContext to name of context of oTask
to
Code:
set projContext to name of containing project of oTask
Hope this helps people!


Code:
  set taskList to ""
tell application "OmniFocus"
	tell the default document to tell the front document window
		set perspective name to "Now"
		set oTrees to trees of content
		set n to count of oTrees
		repeat with i from 1 to n
			set oTask to value of (item i of oTrees)
			set taskTitle to name of oTask
			set projContext to name of context of oTask
			set taskList to taskList & " •    " & taskTitle & "  (" & projContext & ")
"
		end repeat
	end tell
end tell
return taskList

Last edited by Lusule; 2010-11-19 at 11:58 AM..