Quote:
Originally Posted by ekaplan1020
Wow! That worked like a charm. Thanks Dale! Is there an adjustment to the applescript that would put it in a folder called "Matters" (already created)?
|
Try this.
Code:
tell application "Finder"
set project_name to name of container of (theFile)
set file_name to name of (theFile)
set the_date to current date
set the_note to "Added on " & (the_date as string) & "
"
end tell
tell application "OmniFocus"
tell default document
set the_folder to first flattened folder where name = "Matters"
set the_context to first flattened context where its name = "Mac"
set the_project to make new project with properties {name:project_name} at end of projects of the_folder
tell the_project
set the_action to make new task with properties {name:"Review \"" & file_name & "\"", context:the_context}
set note of the_action to the_note
tell the note of the_action
make new file attachment with properties {file name:theFile, embedded:false}
end tell
end tell
end tell
end tell