Looks like changing ‘context’ to ‘tag’ on line 63 is probably all that needs to be done. Should look like this:
set validSelectedItemsList to value of (selected trees where class of its value is not item and class of its value is not folder and class of its value is not tag and class of its value is not perspective)
Apologies, complete novice non-tech here. Copied and pasted fixed script over the original one in Omnifocus/Help/Open Scripts Folder, customized toolbar to add link to revised script, but when I click on link after selecting 3 tasks with estimated time entries, nothing happens. Any sense of what I might be doing wrong? Thanks!
Hmm, Good idea but that’s not it either. I don’t have growl, so I left the default setting at the top of the script to useGrowl: false. No Mac notification for me.
Another shot in the dark: confirm that the entire script made it into your file. For instance, omitting the main() at the end is a good way to have that script run without producing any output.
Thanks again deaghean. No success, but I did get this error message.
The operation couldn’t be completed. osascript: OpenScripting.framework - scripting addition “/Library/ScriptingAdditions/Adobe Unit Types.osax” cannot be used with the current OS because it has no OSAXHandlers entry in its Info.plist.
/Users/kiesel/Library/Application Scripts/com.omnigroup.OmniFocus3/TimeTotal.scpt: execution error: This script contains uncompiled changes and cannot be run. (-2700)
My OSX is High Sierra 10.13.6. Does this mean I have to upgrade the OS to 10.14 for the script to work?
I don’t think so. If that Adobe Unit Types error is the culprit, it probably worked with older OSes rather than newer ones. It’s an old article, but I wonder if running the steps in Solution 1 here would solve that particular issue.
I have the same problem of getting the Total Time script to produce a message. I changed the context to tag, checked the notification settings - all good. In the Script Editor it produces the right notification in the results tab, but in Omnifocus it does simply nothing. No error message at all. Any ideas?
Working for me as well. I did not o a line-by-line comparison with the version linked above, but grabbed the latest from Dan’s Github page here. I had to comment out the subroutine labeled on notifyWithGrowl because of odd characters. This was perfectly fine as I use macOS’s notification system anyway.
I am a total beginner with scripts and although I once had this one working, it has disappeared. I’ve since redone it and it shows up in my Script Editor and works when I hit the play button in the Script Editor but the icon to total the task durations in OF is not showing up! Any clue what I can do to get this there? I tried going to “view” and “customize toolbar” but it’s not there either. I really don’t want to have to highlight my tasks then open the Script Editor to calculate this each time I need to. Thank you!!