View Single Post
Thanks for the quick response Dale. I did check those out and I am still struggling with the way to get the folder names created and use them to set project name, context, etc.

tell application "Finder" to set file_name to (name of theFile)
set theDate to current date
set theNote to "Scanned " & (theDate as string) & "

set projectname to "Test Project"

set theTask to "Review \"" & 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 theProject to projectname
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
This creates a task and sets the projectname to "Test Project". How would I set the project name to the name of the folder?

Thanks again for your help!