View Single Post
If you want to move an action from the inbox into a specific project and context, here's a similar example that does it:

Code:
property myProject : "Build giant robot"
property myContext : "Lair of doom"

tell application "OmniFocus"
	tell front document
		set myActionText to "Draft plans"
		set myActionText to myActionText & "#today #+3d"
		set myResult to parse tasks with transport text myActionText
		set myNewAction to first item of myResult
		set context of myNewAction to context myContext
		move myNewAction to end of tasks of project myProject
	end tell
end tell
You can't just set the project like you can do with the context, because you need to insert the task in the project's tasks data structure.