AppleScript Compile error: Expected “,” but found “property”. -2,741

I tried to compile the full, working script (post 12 of http://forums.omnigroup.com/showthread.php?t=15469&page=21 ) in Script Debugger 5.09, and got an error at:

set blnContext to ((selected view mode identifier) is not equal to pPROJECT)

AppleScript Compile Error: Expected “,”, but found identifier. -2,741

“view” was highlighted when I attempted to compile.

I then found some useful information here: http://support.omnigroup.com/omnifocus-2-applescript-changes :

The selected view mode identifier property on document window is gone, replaced by the selected sidebar tab property. I changed that line to:

set blnContext to ((selected sidebar tab) is not equal to pPROJECT)

… and it did not throw an error, however I got an error

AppleScript Compile Error: Expected expression, etc. but found “:”. -2,741

… based on the colon here: type:styled .

make new column with properties {column type:styled text, name:"Project"}

OmniFocus 2.0.2 Pro; OmniOutliner Pro 4.1.2 (I just upgraded from 3 to 4 to take advantage of the AppleScript.)

My goal is to generate files of completed projects, as I could in OF v.1, i.e., including Estimated time and Completed (date) (when I print to PDF in OF 2, those Inspector data items are not included).

I’d like to get the following into OmniOutliner (or Numbers – something that I can sum Estimated time, to get a total of time on actions; if I could get the following into a PDF, I could probably find some other way to get an aggregate action time):

Project or SAL name

  • Project or SAL notes (including source formatting, if possible)

Action(s)

  • Action note(s) (including source formatting, if possible)
  • Action estimated time
  • Action completed (date/time)
1 Like

I have the same problem (see, How to integrate with OmniOutliner).

Does the script work for anybody using OF2?

I’m not sure what is happening, but I apparently was able to compile the script in Script Editor (perhaps I needed an open document in OO4), but when I attempted to execute, I got:

AppleScript Execution Error

OmniFocus got an error: task id “oImtaw83tBz” of document id “pcPKy2yo5Ph” doesn’t understand the “ReadNodePath” message.