Page 1 of 1

Apply color attributes

Posted: 2009-09-04 13:33:02
by Pat
Hi,

I don't know anything about macros and programming. I'm trying to do a very simple macro: find all 'a' letters and give them different attributes (font, color, style, etc). Now I'm trying to find how to apply a color attribute that is not in the menu (for example, FFCC33). I tried many things that did'nt work including the command "Set text color":

Find all 'a', '-i',
Bold
Set Font Name "Verdana"
Set Text Color "FFCC33"

Re: Apply color attributes

Posted: 2009-09-04 15:52:27
by martin
The "Set Text Color" command only accepts a Color object, not a string. There are many ways to get Color objects (see the macro reference), but this probably fits what you've described best:

Code: Select all

$color = Color.newWithHexTriplet 'FFCC33'
Set Text Color $color
Let me know if you have any more questions.

Re: Apply color attributes

Posted: 2009-09-05 16:46:01
by Pat
Thanks. That's exactly what I wanted to do.