Created
April 22, 2015 12:27
-
-
Save joebuhlig/0e8a29e5f91ac9533f89 to your computer and use it in GitHub Desktop.
Use this script in Hazel to create a hotspot that makes tasks out of files in Omnifocus.
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
tell application "Finder" to set file_name to (name of theFile) | |
set theDate to current date | |
set theNote to "Imported on:" & (theDate as string) & " | |
" | |
set projectname to "Test Project" | |
set theTask to "Review File: " & file_name | |
tell application "OmniFocus" | |
set task_title to theTask | |
tell default document | |
set newTask to make new inbox task with properties {name:task_title} | |
set note of newTask to theNote | |
tell the note of newTask | |
make new file attachment with properties {file name:theFile, embedded:false} | |
end tell | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment