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)
-   -   Checked row colours (http://forums.omnigroup.com/showthread.php?t=2320)

slithytove 2006-12-04 01:33 AM

Checked row colours
 
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

RE: Checked row colours
 
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


All times are GMT -8. The time now is 11:16 PM.

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