Script grammar for "all rows which have named style x"
Fraser Speirs
fraser at speirs.org
Fri Jan 7 10:13:57 PST 2005
On 7 Jan 2005, at 17:47, Michael Terry wrote:
> You should be able to do this:
>
> tell app "OmniOutliner Professional" to tell front document
> get container of every named style of style of every row where its
> name is "Some Style Name"
> end
Unfortunately, that gives me an NSCannotCreateScriptCommandError.
> I've only been able to have a row inherit styles defined in a named
> style that belongs to the document and I don't see an easy way to
> figure out if an inherited style has been applied to a row in
> AppleScript. Is there a way? Is this what you're talking about?
I've been able to apply a named style to a selected row thus:
tell front document of application "OmniOutliner Professional"
add named style "foo" to end of named styles of style of selected row
end tell
Note that if you say something like:
set style of aRow to named style "foo"
then the attributes of "foo" are copied to aRow, but the styles applied
to aRow will not be connected to the named style "foo".
Fraser
--
Technical Coordinator - ScotGrid
a: Room 481, Kelvin Building, University of Glasgow
w: http://ppewww.ph.gla.ac.uk/~fspeirs/ t: 0141 330 6439
More information about the OmniOutliner-Users
mailing list