View Single Post
If I didn't know that Brian was unfailingly generous and polite, I might suspect a hint of satire here :-)

(But as it is, thank you Brian. That is entirely undeserved and very kind :-)


Not quite sure whether you are planning to count tasks completed within a particular span of time, or just the absolute number of leaf tasks (actions rather than action groups) under each heading.

The stats script that Brian points you to uses SQL to query the cache. That approach is certainly fast, but might also give a slightly steeper learning curve at first. If you were going to do it with pure Applescript, the kernel of it might have this kind of shape:

Code:
tell application id "OFOC"
	tell default document
		set lstProj to {"summarize", "draft"}
		set strReport to ""
		repeat with oTerm in lstProj
			set strReport to strReport & oTerm & tab & ¬
				(count of (flattened tasks where name contains oTerm and it is not root task of its containing project and it is not in inbox and number of tasks = 0)) & ¬
				return
		end repeat
		display dialog strReport
	end tell
end tell

set the clipboard to strReport
  • lstProj could contain the list of project names that interest you,
  • and the list of conditions could be lengthened to narrow the count down to tasks completed within a particular period, etc.