PDA

View Full Version : View mode identifiers


RobTrew
09-29-2007, 04:10 AM
I have yet to learn the applescript trick with view mode identifiers.

I can get an existing view mode identifier, but have no luck with code like:

Tell application "Omnifocus"
set oWin to document window
tell oWin
set foo to available view mode identifiers
set selected view mode identifier to "project"
end tell
end tell

which raises errors such as:
Can't get available view mode identifiers of document window.
and
Can't set «class FCvm» of «class FCdw» to "project"

Any thoughts ?

RobTrew
09-29-2007, 10:39 AM
Ah. This does work:

tell application "OmniFocus"
set oWin to window 1

set foo to available view mode identifiers of oWin
set selected view mode identifier of oWin to "context"
end tell

The problem seems to lie in specifying a document window ...