View Single Post
Hi,

I've got 2 questions regarding OmniOutliner and AppleScripts:

1) Is it possible to check in an apple script if a row is numbered, and which numbering system it is using (legal, letters, numeric, etc.)?

2) Is there an elegant way of checking if a style name is applied to a given row. The only way I've found so far is a bit ugly and involves creating a temporary list of style names:

-- Ugly part begins
set theStyleNames to {}
set theNamedStyles to named styles of the style of theRow
repeat with theNamedStyle in every item of theNamedStyles
set theStyleNames to theStyleNames & (the name of theNamedStyle)
end repeat
-- Ugly part ends

if theStyleNames contains "Heading 1" then
-- do something clever here
else if theStyleNames contains "Heading 1" then
-- do something clever here
end if

Thanks a lot for your help!

Kind regards,

Julien