View Single Post
FWIW, here's what I use to set context:

set newContext to my getContext("home")
set context of thisItem to newContext

on getContext(contextName)
	tell application "OmniFocus"
		tell front document
			set contextID to id of item 1 of (complete contextName as context)
			return first context whose id is contextID
		end tell
	end tell
end getContext
getContext returns the best match for a given string, so "home" would match "Home" before the "Home > Garden" context.