PDA

View Full Version : Checked row colours


slithytove
2006-12-04, 01:33 AM
Does anyone have or know of an Applescript that will modify the font colour for a row based upon it's checked status.

For example I would like to have all rows with ticked boxes 'green', all those with blank boxes 'red' and those marked '-' coloured 'amber'.

I thought I would throw out the question before diving in to create a script myself.

Any suggestions would be gratefully received,

Martin

Ed Renaud
2006-12-04, 09:39 AM
Hi,

I have defined styles with names to match the value in my "status" column and then invoke this script to apply the style (with it's color) to the rows depending on status; it should be close to what you are looking for!

Ciao!

tell application "OmniOutliner Professional 3.6.2b1"
set MyDoc to front document
repeat with MyRow in (every row of MyDoc)
named styles of style of MyRow
remove every named style of style of MyRow from named styles of style of MyRow
set MyPriority to value of cell "Status" of MyRow
if MyPriority is not missing value then
set MyNamedStyle to named style (MyPriority as string) of MyDoc
if MyNamedStyle is not missing value then
named styles of style of MyRow
add MyNamedStyle to named styles of style of MyRow
end if
end if
end repeat
end tell