A script to calculate duration tasks in OF2

Is there such thing?

Yes, Dan Byler wrote a script a few years back which totals up estimated times:

Pointers to other useful or interesting scripts can be found on our inside.omnifocus.com website:


I love this script to calculate durations, it’s very helpful in planning. However, it appears to only work in OF 1. Does anyone know if this can be made to work in OF 2?

It would be great to have this functionality built into OF 2, where I could select a bunch of tasks, and OF would automatically calculate the total time for that group.

1 Like

I hate to say “works for me”, but, well, it does work for me on OmniFocus 2.
Could you be more specific about how it’s not working in OF2 for you? If there’s an error message, please provide the specific text of the error message.
(Note that using AppleScript in OmniFocus 2 requires a Pro license or in-app purchase.)

I’m glad it works for you, it’s probably something I’m doing wrong on my end. I’ll give it another shot.

Make sure you select tasks with the Estimated Time, before you run the script:

  1. Open the Script
  2. Select the tasks with the estimated time
  3. Run the script with the button
  4. Results should appear
1 Like

It works for OmniFocus 3,

except for the path:

the script should be in:

/Users/USER/Library/Application Scripts/com.omnigroup.OmniFocus3

where USER is your user name.

According to Dan Byler:

”To make sure the script is in the right place, do this:

OmniFocus → Help menu → Open Scripts Folder

The correct folder will open in the Finder. Move the script there and restart OmniFocus, and it should appear in the Toolbar options."

with best regards,
Omar KN
Stockholm, Sweden

Hi guys - loved this on OF2. Trying to get to run on OF3 and getting this error:

AppleScript reported the following error:

The operation couldn’t be completed. /Users/quinnemmett/Library/Application Scripts/com.omnigroup.OmniFocus3/Total Time.applescript:1840:1847: execution error: The variable context is not defined. (-2753)

I get this no matter what I select – one item, multiple items, etc. Everything has a duration. Using it exactly how I used in OF2.

Any help would be greatly appreciated.

Did you change ‘context’ to ‘tag’ on line 63?
see link:

Same topic here: Total Time script in OF3 for macOS


with best regards,
Omar KN
Stockholm, Sweden

Fixed! Thank you!