The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Today's Posts

 
OmniFocus AppleScript for Statistics Creation (for download) Thread Tools Search this Thread Display Modes
If you PM me your email address, I'll email you a copy of the script.
 
Hi Soren,

I have it also here: http://www2.digital-imago.net/omnifo...ics_v1_3_1.zip

Hope this helps.
 
I just ran the script (left it running while I went off to lunch, never had the patience before!) and I must say I enjoy that sort of stuff, even though it probably doesn't have any relevance for me! I think maybe I'll have it run in the middle of the night by iCal.

One little improvement suggestion: the script outputs "less then" where "less than" would be correct.
 
Quote:
Originally Posted by BwanaZulia View Post
Are there going to up updates?

BZ
for now I have not made a new version, the one uploaded is the latest.
I had no idea what other interesting statistic I could create.
 
This is a really awesome script. Thanks!
 
Quote:
Originally Posted by digitalimago View Post
for now I have not made a new version, the one uploaded is the latest.
I had no idea what other interesting statistic I could create.
I just discovered this script. It's great. However, it doesn't have the one statistic that I was looking for: number of available tasks versus the number that are blocked or haven't hit the start date. I'm not sure that's possible to glean from the AppleScript interface however.

I might take a look in my copious free time.
 
Quote:
Originally Posted by WillisWasabi View Post
number of available tasks versus the number that are blocked or haven't hit the start date. I'm not sure that's possible to glean from the AppleScript interface however.
"Available" turns out to be a fairly complex filter. In Applescript terms:
(blocked is false) and (completed is false) and ((start date is missing value) or (start date < now)) and ((its containing project is missing value) or (status of its containing project is active) and ((start date of its containing project < now) or (start date of its containing project is missing value))) and ((its context is missing value) or ((allows next action of its context is true) and (hidden of its context is false)))
(From a summary of the filters in another post).

--
 
Thus the following should return what you want (though it will not be fast).

Code:
tell application id "com.omnigroup.omnifocus"
	tell default document
		set now to (current date)
		set strReport to "Remaining: " & ((count of (flattened tasks where completed is false)) as string) & ¬
			return & return & ¬
			"Available: " & (count of (flattened tasks where (blocked is false) ¬
			and (completed is false) and ((start date is missing value) or (start date < now)) ¬
			and ((its containing project is missing value) or (status of its containing project is active) ¬
			and ((start date of its containing project < now) or (start date of its containing project is missing value))) ¬
			and ((its context is missing value) or ((allows next action of its context is true) and (hidden of its context is false))))) as string
	end tell
end tell

display dialog strReport buttons {"OK"} with title "Stats: Remaining vs Available"
--
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Script for a quick listing of OmniFocus statistics RobTrew OmniFocus Extras 51 2014-02-17 01:58 AM
OmniFocus Statistics skylarkelly OmniFocus Extras 4 2012-02-29 06:44 AM
Applescript creation of tasks with existing dates nikolaj OmniPlan Extras 1 2010-09-02 04:44 PM
AppleScript automating creation of Finder & Mail folders omnibob OmniFocus Extras 4 2009-07-20 12:25 AM
OmniFocus crash statistics Ken Case OmniFocus 1 for Mac 0 2007-07-25 03:05 PM


All times are GMT -8. The time now is 11:24 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.