nisus.com
https://www.nisus.com/forum/

Apply color attributes
https://www.nisus.com/forum/viewtopic.php?f=17&t=3529
Page 1 of 1

Author:  Pat [ 2009-09-04 13:33:02 ]
Post subject:  Apply color attributes

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"

Author:  martin [ 2009-09-04 15:52:27 ]
Post subject:  Re: Apply color attributes

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:
$color = Color.newWithHexTriplet 'FFCC33'
Set Text Color $color

Let me know if you have any more questions.

Author:  Pat [ 2009-09-05 16:46:01 ]
Post subject:  Re: Apply color attributes

Thanks. That's exactly what I wanted to do.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/