The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus 1 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Apple Script and OF help Thread Tools Search this Thread Display Modes
I am trying to get my leads into omni focus from my action folder (Macsparky inspired) along with the actual pdf AND have a context and project. I can get most of the way there using cobbled together scripts. The Problem is I can't get it all to happen. I either get a context and project or I get the file.

I am new to AppleScript, I have done some programming in the past but cannot seem to get this to work. Here is my script. It doesn't work but hopefully you can see what I'm trying to do.

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

set theProject to "Sales"
set theContext to "Phone"

set theTask to "Call \"" & file_name & "\""

tell application "OmniFocus"
tell theProject
make new task with properties {name:theTask, context:theContext}
set note of theTask to theNote
tell the note of theTask
make new file attachment with properties {file name:theFile, embedded:true}
end tell
end tell
end tell

Please help, I'm totally lost.
The name of a project or context doesn't in itself constitute a reference to a project or context.

Analogous code here:

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

All times are GMT -8. The time now is 09:29 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.