Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use this script in Hazel to create a hotspot that makes tasks out of files in Omnifocus.
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