Created
February 2, 2017 23:25
-
-
Save bayleedev/81642daddfa60c47594a783646366c65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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