|
Robkin Newbie
Joined: 24 Jun 2003 Posts: 2 Location: USA
|
Posted: Thu Jun 26, 2003 7:53 pm
Highlighting a single word? |
I would like to highlight a single word. Not the whole line of that word in other words.
example: Rat
Would to make it green, but dont want the whole line green or rat in rations green , just the word rat when it is a worb by itself.
thnakz |
|
|
|
Humpton Apprentice
Joined: 10 Oct 2000 Posts: 158 Location: Chicago, IL
|
Posted: Thu Jun 26, 2003 8:21 pm |
Easy. #CW {Rat} {PrettyColor}
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Jun 26, 2003 9:48 pm |
Unfortunately, there's no easy way to create a pattern which matches rat but not rations. You'll need several patterns to allow for rat at the beginning or middle of a line, and followed by a space or punctuation. The punctuation will also be colored green. I've assumed you won't have "rat" as a single-word sentence/phrase at the beginning of the line.
#CW {^rat%s} {green}
#CW {%srat%s} {green}
#CW {%srat%p} {green}
Edited to replace spaces with %s. |
|
|
|
atreus Beginner
Joined: 22 Mar 2005 Posts: 21
|
Posted: Tue Mar 22, 2005 11:17 pm |
I'm having a little bit of trouble here as well. What I have so far:
#TR {^Your default pack tactic is ~'*~'.} {#CW {%1} {$cccc00}}
Works fine, whenever I get something like: "Your default pack tactic is 'encirclement'." only the string inside single quotes is colored yellow, just like I wanted it.
Now, the weird part is that after I get a line like that, zMud automatically adds a new trigger in my trigger list, with "encirclement" as the pattern and "#CW $cccc00" as the value. This, of course, causes that the word "encirclement" (and any other string that matches the original trigger pattern) appears yellow, anywhere on the screen. Not exactly what I wanted, after all.
What am I doing wrong?
.atr. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Mar 23, 2005 2:53 am |
Quote: |
Unfortunately, there's no easy way to create a pattern which matches rat but not rations.
|
Actually, there is. It uses the %q wildcard, which matches punctation, whitespace, and can anchor on either side of the line.
#trigger {%qrat%q} {#cw green} |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|