|
cachew Novice
Joined: 10 May 2001 Posts: 39 Location: USA
|
Posted: Wed May 01, 2002 10:28 pm
2 Color questions |
hello,
I have 2 seperate instances where I am trying to change the color of items that have been processed by a script and rewritten to the screen. In both instances I can color the entire line a single color but I cannot seem to color just the items that I want. I keep trying iterations but the syntax is just killing me.
The first example is: (this is part of a class).
#TRIGGER (*)
#VARIABLE Aura {%1}
#if ("%1" = "(Blue Aura)") {#var Aura {~(Good~)}}
#if ("%1" = "(Red Aura)") {#var Aura {~(Evil~)}}
#SUBSTITUTE {@Aura}
I have no problem reading in and displaying the correct text. I am trying to color the word evil red and the word good blue ... but just the words. The two brackets on either side should be colored green.The second example refers to a previous emai that I posted on on 4/29 entitled "help with a text replacement script".
I am attempting to color the %1 parameter (which can be either one or two words) yellow and the rest of the parameters in the substitute trigger green.
Any ideas on the syntax for this ... must have tried 25 ways on each of them. thanks.
Christopher Chew |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu May 02, 2002 1:28 am |
I'd suggest dropping the variable and doing the substitution directly. This will allow you to easily include the appropriate %ansi functions.
#if ("%1" = "(Blue Aura)") {#SUB {%ansi(green)~(%ansi(blue)Good%ansi(green)~)}}
P.S. Actually, I'd just learn that Blue was good and Red was evil and proceed without the #SUB. That way I could use #CW to color the Auras. But then, I usually try to find the easiest way to do things instead of the hardest.
LightBulb
Vague questions get vague answers |
|
|
|
cachew Novice
Joined: 10 May 2001 Posts: 39 Location: USA
|
Posted: Thu May 02, 2002 2:32 am |
Thanks I appreciate the help. Your example worked great.
Christopher Chew |
|
|
|
|
|