Colors for text in cells with script
Hello
In the script below that SGIII wrote to me almost 3 years ago, I would like to be able to change the text colors for each of the 2 different row colors.
Thank you!
The discussion can be found at the following link:
https://discussions.apple.com/thread/8304672?answerId=33110614022#33110614022
set testVal to "Montréal"
set testCol to 2 -- column "B"
set highlightColor1 to {65535, 65535, 2713} --"yellow"
set highlightColor2 to {0, 0, 65416} -- "blue"
tell application "Numbers"
tell front document's active sheet
tell (first table whose selection range's class is range)
repeat with r in rows 2 thru -1 -- skip header row
if r's cell testCol's value contains testVal then
set r'sbackground color to highlightColor1
else
set r'sbackground color to highlightColor2
set r'scells'stext color to highlightColor1
end if
end repeat
end tell
end tell
end tell
iMac, OS X 10.11