Guest
2010-02-28, 01:37 PM
PS an even shorter (and non-recursive) route to a full project list would be:
Code:
set lstProjects to ProjectList("all-projects")
on ProjectList(strFilter)
tell application id "com.omnigroup.OmniFocus"
tell front window
set selected view mode identifier to "project"
set focus to {}
tell sidebar
select library
set selected smart group identifier to strFilter
end tell
set lstProject to {}
repeat with oTree in trees of content
set end of lstProject to value of oTree
end repeat
lstProject
end tell
end tell
end ProjectList
Which can be simply filtered by choosing an alternative smart group identifier string :
"remaining-projects"
"active-projects"
"stalled-projects"
"pending-projects"
"on-hold-projects"
"dropped-projects"
"completed-projects"
--
Last edited by RobTrew; 2010-02-28 at 02:27 PM..