View Single Post
Michael,
In case you haven't figured out how to do it yet, here's how I accomplished this:

Code:
tell application "OmniFocus"
	tell default document
		set theProject to project "Follow Up"
		set theContext to context "Online" of context "Mac" of context "Home"
		set newTask to make new inbox task with properties {name:taskName, note:taskNote, context:theContext}
		set assigned container of newTask to theProject
		
		compact -- Clean up the task from the inbox since it has project and context
	end tell
end tell
The key is the two lines after "set newTask". The first assigns it to the project represented by theProject, and the second is equivalent to pressing the "Clean Up" toolbar button within OmniFocus itself.

Hope this helps. :)

Andy