The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniOutliner 3 for Mac (http://forums.omnigroup.com/forumdisplay.php?f=9)
-   -   OO scripting failures (http://forums.omnigroup.com/showthread.php?t=7582)

hardcoreUFO 2008-03-23 06:10 PM

OO scripting failures
 
I have a very simple OO script that does not seem to be working as advertised:

tell application "OmniOutliner Professional"
activate
tell front document
set note expanded of selected row to true
end tell
end tell

Instead of expanding the note of the selected row, I get an error saying:
"Cant set <<class OOne>> of <<class OOsr>> to true"

I thought thats what this command was *supposed* to do.

RobTrew 2008-03-23 07:55 PM

One needs to specify which member(s) of the rows collection.

e.g.

[CODE]tell application "OmniOutliner Professional"
activate
tell front document
set note expanded of selected row 1 to true
end tell
end tell[/CODE]

or

[CODE]tell application "OmniOutliner Professional"
activate
tell front document
set note expanded of every selected row to true
end tell
end tell[/CODE]

RobTrew 2008-03-24 11:23 PM

of course, it may be more useful to have a script which toggles the selected rows back and forth between note expanded and note closed.

e.g.

[CODE]tell application "OmniOutliner Professional"
activate
repeat with oRow in every selected row of front document
tell oRow
set note expanded to not (note expanded)
end tell
end repeat
end tell[/CODE]


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

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