You can use an alternative method, that allows you to use the Highlight list and all the features it provides (like colouring the line). As it lets mirc handle the display, issues like consecutive spaces are avoided. This method is based on 2 features: a) the fact that you can use identifiers/variables as highlight items , b) the ^ event prefix, which triggers an event before mirc deals with the message internally. This allows you to change the value returned by the variable/identifier in the Highlight list before mirc attempts to match the items against the message/nick. Here it is:
Code:
on ^*:text:*:*: set -u1 %text $1- | set -u1 %nick $nick
on ^*:action:*:*: set -u1 %text $1- | set -u1 %nick $nick
alias hlreg {
  if $2 & 1 && $regex($strip(%text),$1) { return %text }
  if $2 & 2 && $regex(%nick,$1) { return %nick }
}
Then you can make custom identifiers and use them as items in the Highlight list, like this:
Code:
alias itemA return $hlreg(<pattern A>,[color:red]1[/color])
alias itemB return $hlreg(<pattern B>,[color:red]2[/color])
alias itemC return $hlreg(<pattern C>,[color:red]3[/color])
Then you can add $itemA, $itemB, $itemC etc in the Highlight list.
Notice the 2nd parameter in $hlreg (red numbers). If you set the "Match on:" item in the Highlight list to "Message only" you'd set that number to 1 in $itemA. For "Nickname only" the number should be 2 (ie something like $itemB) and for "Nickname and message" something like $item3.

Example: to highlight text containing double words (eg "hello hello" or "this is is a script" etc), you'd create this custom identifier:
Code:
alias someitem return $hlreg(/(\w+) \1/,1)
and then add "$someitem" in the Highlight list.

Edit: forgot to $strip() text

Last edited by qwerty; 17/10/03 02:52 PM.

/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com