The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   View mode identifiers (http://forums.omnigroup.com/showthread.php?t=4995)

RobTrew 2007-09-29 03:10 AM

View mode identifiers
 
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:

[CODE]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[/CODE]

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

Any thoughts ?

RobTrew 2007-09-29 09:39 AM

Ah. This does work:

[CODE]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[/CODE]

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


All times are GMT -8. The time now is 08:28 AM.

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