1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| 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
|