I got it working... the syntax of the parse command changed a bit with omnifocus 2:
on alfred_script(q)
set theName to (q)
set isRunning to false
tell application "System Events"
if exists process "OmniFocus" then
set isRunning to true
end if
end tell
if isRunning is true then
tell application "OmniFocus"
tell default document
parse tasks into with transport text q
end tell
end tell
else
tell application "OmniFocus" to activate
tell application "OmniFocus"
parse tasks into default document with transport text q
end tell
end if
end alfred_script
both ways of calling "parse" are shown in the script - just paste it to the script editor. Should work now!