View Single Post
This version allows for a variety of custom task lists, and can be used either to create text files, or for displaying lists in Geektool windows.

If you install it in your OmniFocus script folder as:
~/Library/Scripts/Applications/Omnifocus/OFTaskList.scpt
you can then run it from the Terminal (or in Geektool) with arguments specifying the query and the list header (optionally redirecting the output into a text file).

(Note that the query and header should be enclosed in single quotes)
osascript ~/Library/Scripts/Applications/Omnifocus/OFTaskList.scpt 'flagged is true' 'Flagged' > FlaggedTasks.txt
osascript ~/Library/Scripts/Applications/Omnifocus/OFTaskList.scpt 'next is true' 'Next actions' > NextActions.txt
For use with Geektool, there is no need to redirect to a text file. Just give the query and the header
osascript ~/Library/Scripts/Applications/Omnifocus/OFTaskList.scpt '((due date ≤ soon) or (flagged is true))' 'Soon and Flagged'
If no arguments are supplied, the script still defaults to outputting a Next Actions list.

For details of the queries corresponding to OF filter settings, see the FAQ on this forum. The terms now and soon can both be used in queries involving dates. Soon will be interpreted in accordance with your setting under:
OF > Preferences > Data > Due "Soon" is in the next N days
--

Last edited by RobTrew; 2011-07-05 at 07:46 AM..