Skip to content

Instantly share code, notes, and snippets.

@bayleedev
Created February 2, 2017 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bayleedev/81642daddfa60c47594a783646366c65 to your computer and use it in GitHub Desktop.
Save bayleedev/81642daddfa60c47594a783646366c65 to your computer and use it in GitHub Desktop.
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