Re-write again for context:
Code:
on makeInboxTask(theName, theProject, theContext, theNote)
tell application "OmniFocus" to tell default document
set theTask to make new inbox task with properties {name:theName}
if theNote is not missing value then set note of theTask to theNote
if theContext is not missing value then
set theContext to context theContext
set context of theTask to theContext
end if
if theProject is not missing value then
set theProject to project theProject
set assigned container of theTask to theProject
compact
end if
end tell
end makeInboxTask