View Single Post
Joakim,

The most interesting/challenging part of scripting batch queries like yours in OF is finding all the tasks. The OF Applescript dictionary doesn't support batch operations, so you have to write a script that "walks" down all the folders, projects, action groups, and actions in the database, checking each for whether it matches what you're looking for. There are a few scripts out there that already do this. One example is my Verify Next Actions Exist script, available from my software page. You could use that script as a basis but tweak how it decides which items to add to its list and which items to ignore.

An alternative would be to create a script that uses perspectives. Create a context-mode perspective showing completed items grouped by completion date, with all groups collapsed except Completed Today. Your script would then open that perspective and grab the visible actions. My old Send OmniFocus items to OmniOutliner might serve as a useful skeleton for grabbing the visible actions.

Cheers,

Curt
__________________
Cheers,

Curt