I want to be able to create a new Project in OF2 through AppleScript (this will be alongside creating a series of folders in Finder and mailboxes in Mail (essentially I want to create a series of things once I decide I need to focus on something.
I got the various Finder scripts working, but can’t see how to do this in OF2. I have the OF2 data file (I think) located on a hard drive called ‘Content’. I have tried both of the following:
(1)
make new project at folder “/Volumes/Content/Torchy/Library/Containers/com.omnigroup.OmniFocus2/Data/Library/Application Support/OmniFocus/OmniFocus.ofocus/Personal” with properties {id:“New Prospect”}
(2)
make new project at folder “Personal” of folder “OmniFocus.ofocus” of folder “OmniFocus” of folder “Application Support” of folder “Library” of folder “Data” of folder “com.omnigroup.OmniFocus2” of folder “Containers” of folder “Library” of folder “Torchy” of disk “Content” with properties {id:“New Prospect”}
Both come up with errors:
(1) Compiles, but on run gives this:
error “OmniFocus got an error: Can’t get folder “/Volumes/Content/Torchy/Library/Containers/com.omnigroup.OmniFocus2/Data/Library/Application Support/OmniFocus/OmniFocus.ofocus/Personal”.” number -1728 from folder “/Volumes/Content/Torchy/Library/Containers/com.omnigroup.OmniFocus2/Data/Library/Application Support/OmniFocus/OmniFocus.ofocus/Personal”
(2) Doesn’t compile and gives this:
Expected end of line, etc. but found “"”. (With the error on the first " of Content
Once those of you who know what you’re doing stop laughing, could you maybe point me in the right direction.
Thanks,
David