Skip to content

Instantly share code, notes, and snippets.

@bayleedev
Created Feb 2, 2017
Embed
What would you like to do?
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 front document
make new inbox task with properties {name:theName}
end tell
end tell
else
tell application "OmniFocus" to activate
tell application "OmniFocus"
tell front document
make new inbox task with properties {name:theName}
end tell
end tell
end if
end alfred_script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment