 |
Stevestones01 Beginner
Joined: 25 May 2010 Posts: 14
|
Posted: Fri Jun 25, 2010 10:30 pm
coloring an exact pattern |
ok, I know how to color words. But I can't get it to color the word if it's only by itself.
I'm using the trigger:
Code: |
#TRIGGER {{@en}} {#CW %eval(%color(red)+%color(hi))}
|
And while this does color the word's I want it to. It colors the word even if it's in the middle of another word. For example...
I have the word 'orc' in the list, so I want it to only highlight orc if it's by itself, not if it's in the middle of a word or name like, 'authorcan', or even if it's at the end or beginning of a word. I tried changing the trigger to this....
Code: |
#TRIGGER {~ {@en}~ } {#CW %eval(%color(red)+%color(hi))}
|
and that works for most things. But when the word I want highlighted is the first word in the sentence and there's no space it won't highlight it. Like if some one is entering or leaving a room.
Not sure if I'm being very clear with this so if I'm not please let me know. Is there any way to do what I'm trying to do? |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Jun 25, 2010 11:11 pm |
Use %q. For example{%q@en%q}.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
Stevestones01 Beginner
Joined: 25 May 2010 Posts: 14
|
Posted: Sat Jun 26, 2010 1:25 am |
%q worked perfectly, thank you. However when I put it inside the brackets it crashed cmud... so I just put them on the outside and everything seems to work just fine.
|
|
|
 |
|
|