|
Aarlot Adept
Joined: 30 Dec 2003 Posts: 226
|
Posted: Thu Aug 11, 2005 2:18 am
#PSUB and color |
Is there any way to add color within a #PSUB? I've tried using %ansi and <color=red>, but neither gets expanded.
|
|
_________________ Everyone is entitled to their beliefs - until they die. Then only the truth matters. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Thu Aug 11, 2005 2:21 am |
%ansi works for me
#PSUB {%ansi(red)This is red!} %x1 |
|
|
|
Aarlot Adept
Joined: 30 Dec 2003 Posts: 226
|
Posted: Thu Aug 11, 2005 2:28 am |
Hrmm... maybe it was my having it within an %if statement then? Here's the actual trigger:
#TRIGGER {IronWood - (&03)$} {
#IF (@woodnums.ironwood = %eval( %1)) {#CW green} {#CW Red}
#IF (@CurrentCraft="Woodcutter") {#HIGHLIGHT}
#VARIABLE woodnums.ironwood %eval( %1)
#PSUB {%1 : %if(@woodnums.total=%eval( @woodnums.pine+@woodnums.cedar+@woodnums.redwood+@woodnums.oak+@woodnums.ironwood),"%ansi(green)","%ansi(red)")Total: %eval( @woodnums.pine+@woodnums.cedar+@woodnums.redwood+@woodnums.oak+@woodnums.ironwood)} %x1
#VARIABLE woodnums.total {%eval( @woodnums.pine+@woodnums.cedar+@woodnums.redwood+@woodnums.oak+@woodnums.ironwood)}
} "" {case}
This gives, when triggered:
Code: |
%ansi(green)Total: 67
|
Rather than changing the color, it just puts the ansi in there verbally |
|
_________________ Everyone is entitled to their beliefs - until they die. Then only the truth matters. |
|
|
|
Aarlot Adept
Joined: 30 Dec 2003 Posts: 226
|
Posted: Thu Aug 11, 2005 4:09 am |
nvm, figured it out. Can't have the "" around the %ansi
|
|
_________________ Everyone is entitled to their beliefs - until they die. Then only the truth matters. |
|
|
|
|
|