Reply to topic  [ 3 posts ] 
Apply color attributes 
Author Message

Joined: 2009-09-04 13:11:25
Posts: 28
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"


2009-09-04 13:33:02
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
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.


2009-09-04 15:52:27
Profile WWW

Joined: 2009-09-04 13:11:25
Posts: 28
Thanks. That's exactly what I wanted to do.


Last edited by Pat on 2009-09-08 05:37:32, edited 1 time in total.



2009-09-05 16:46:01
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software