View Single Post
Quote:
Originally Posted by RobTrew View Post
The ProjNames() functions is something which I sketched before OF 1.9, and it is no longer required.

The new flattened projects collection is now all you need:

Code:
tell application "OmniFocus"
	set oDoc to default document
	set my text item delimiters to ASCII character 10
	
	set projNames to (name of (flattened projects of oDoc where hidden of its folder is false and its status is active)) as string
	
	set my text item delimiters to space
	set projNames to do shell script "echo " & quoted form of projNames & " | sort -f"
end tell
I am trying to have a column in OO display a list of all projects and another column display a list of all contexts in OF. Can this script be modified to show all contexts? I tried substituting "all contexts" for all projects, but got an error message -

"Can’t make name of every «class FCfc» of document id \"gBlhvZFrou-\" of application \"OmniFocus\" whose «class FCHi» of «class FCAr» = false and «class FCPs» = «constant FCPsFCPa» into type string." number -1700 from name of every «class FCfc» of document id "gBlhvZFrou-" whose «class FCHi» of «class FCAr» = false and «class FCPs» = «constant ****FCPa» to string