|
Dfgaskins Newbie
Joined: 26 Mar 2004 Posts: 5
|
Posted: Fri Mar 26, 2004 9:34 pm
Highlighting specifics |
Would like to make a trigger that does the following to a line similar to this.
[ 374h/374H 0m/0M 110v/110V ] Alyrin ••••••••••
i would like to highlight specificly the name in the line and only if it falls under my @vtarget variable...
I was under the impression that this would work
Pattern:
^(%w)h/(%W)H (%w)m/(%W)M (%w)v/(%W)V @vtarget
Command:
#cw @vtarget 13
...
someone please help me and show me what i am doing wrong here. |
|
|
|
Vorax Apprentice
Joined: 29 Jun 2001 Posts: 198 Location: USA
|
Posted: Fri Mar 26, 2004 11:13 pm |
Assuming your @vtarget variable is a string list:
Pattern:
^(%w)h/(%W)H (%w)m/(%W)M (%w)v/(%W)V {(@vtarget)}
Command:
#cw %7 13
The variable is inclosed in {} brackets to show it's a string list and then within parenthasis to store the value in one of the %1..%99 system variables. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Mar 26, 2004 11:24 pm |
#CW is used to color the entire pattern of the trigger. If you only want to color a portion of it, use #PCOL.
If you were using #CW, the #CW pattern color syntax is only used to make a new trigger. When you just want to color something, the correct syntax is just #CW color. But in this case, it's not even the correct command.
In addition, you've used the wrong wildcard for the numbers. %w is alpha characters only (no numbers). %W (upper case) has never been officially recognized and doesn't even work in the latest versions. Numbers are matched with %d. Additional choices may be found in the help topic Pattern Matching.
If @vtarget is a single name, it can be used as is. If it's a list of names it needs to be enclosed by {}. In either case, it will need to be enclosed by () in order to be referenced by #PCOL.
Pattern:
^(%d)h/(%d)H (%d)m/(%d)M (%d)v/(%d)V (@vtarget)
Command:
#PCOL hi,magenta %x7 |
|
|
|
Dfgaskins Newbie
Joined: 26 Mar 2004 Posts: 5
|
Posted: Sun Mar 28, 2004 6:44 am |
nither of these fixed my problem... hmmm I will figure it out...
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Mar 28, 2004 6:04 pm |
It would probably help if your pattern actually matched the line. That means it has to include all the special characters and spaces, or use wildcards to replace them. The easiest way to handle the special character and spaces at the beginning of the line is to remove the ^ anchor. The others can be matched with appropriate wildcards.
This also appears likely to be a prompt, so you may need to enable the Prompt option.
[ 374h/374H 0m/0M 110v/110V ] Alyrin ••••••••••
Variable Name: vtarget
Value: Alyrin
Trigger Pattern:
(%d)h/(%d)H %s (%d)m/(%d)M %s (%d)v/(%d)V * (@vtarget)
Command:
#PCOL hi,magenta %x7 |
|
|
|
Dfgaskins Newbie
Joined: 26 Mar 2004 Posts: 5
|
Posted: Mon Mar 29, 2004 1:54 am |
danke worked
|
|
|
|
|
|