View Single Post
I completed my Reset Review Dates script tonight using Curt's template and it works well.

Interestingly enough, the script won't run if I launch it from the scripts menu icon - it only runs when launching it from a toolbar button, or from the Play button in Applescript Editor.

I also create a script that counts my active and onhold projects. Here's the code I put in the handleProjects snippet:
Code:
        set activeProjectCount to 0
        set onholdProjectCount to 0
        repeat with theProject in theMatchedProjects
            if status of theProject is active then
                set activeProjectCount to activeProjectCount + 1
            end if
            
            if status of theProject is on hold then
                set onholdProjectCount to onholdProjectCount + 1
            end if
        end repeat
        display dialog ((activeProjectCount as string) & " active projects
" & (onholdProjectCount as string) & " onhold projects")
One more thing I'd like to do here - I'd also like the counts of my Stalled and Pending projects (using the terms from the sidebar filter). But of course, these are not actual statuses for the project, they are derived by OmniFocus. I'm out of time for tonight, but I think Curts's NextActions script would have the logic for the Stalled count... I'll see if I can shoehorn it in later on. (Obviously a simple look at the start date will do it for the Pending.)