View Single Post
For the AppleScript wizards out there, I'd like to highlight an item from our OmniFocus 1.9.4 release notes:

Quote:
Worked around an issue in when using full-screen mode on OS X Lion which would cause certain AppleScripts attempting to target the front window to fail.

If you are the author of a script which uses the following idiom:

Code:
tell application "OmniFocus"
    tell front document
        tell (first document window whose index is 1)
            ... 
        end tell
    end tell
end tell
Please discontinue using it. This idiom will fail in situations other than full-screen mode on OS X Lion. The correct template to use is:

Code:
tell application "OmniFocus"
    tell first document window of front document
      ...
    end tell
end tell

Last edited by Lizard; 2011-10-26 at 02:44 PM.. Reason: formatting