mIRC Home    About    Download    Register    News    Help

Print Thread
S
StrawberryKitty
StrawberryKitty
S
Network specific highlighting would be a very useful feature, I keep getting highlights across networks for things that aren't specific to that network. Would be a great feature ^^

Joined: Dec 2002
Posts: 294
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 294
This could be a useful feature if it was integrated into the UI. However, there is a workaround you can use to get this behavior in the meantime.

Let's say you want to highlight the word "strawberry" when it appears on any channel on EFnet, but not any other network. You could do that by first creating a custom alias in the remotes section like this:

Code:
alias hl-strawberry { if ($network == EFnet) { return strawberry } }


Then, you would set the highlight text to:

Code:
$hl-strawberry


This would give the desired result.

Another common example might be if you want to match when anyone uses whatever nickname you are currently using, which can be done more simply by just setting the highlight text to

Code:
$me

S
StrawberryKitty
StrawberryKitty
S
Hum thanks for the work around I'd still like if it was added to the GUI :3

S
StrawberryKitty
StrawberryKitty
S
Mew unfortunatly I can't seem to get it working with wild cards...

I tried this:

Code:
alias hl-straw__ {
  if ($istok(fakeºnotrealºboo,$network,186)) {
    return Straw *
  }
}


then added "$hl-straw__" to my highlights and typing "straw mew" did not set off the highlight. I then tried this:

Code:
alias hl-straw {
  if ($istok(fakeºnotrealºboo,$network,186)) {
    return Straw
  }
}


and added "$hl-straw *" same problem it doesn't trigger..

I'm guessing the wild card loses it's special quality when return is used.. Any ideas? *Hopes for a GUI version* ^^;

Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
Wilcards are not necessary there. Adding network support to the GUI won't change that fact. just use $hl-straw and that's it, it will match "Straw" anywhere in the line.

As a sidenote, why on earth are you using $chr(186) (a NON-ASCII character) as a token delimiter in your hardcoded data? Use a sane value, like a space.

Joined: Dec 2002
Posts: 294
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 294
I also can't get wildcards to work when using this method. To be honest, I'm not even sure if using identifiers with the highlight feature is intended behavior -- I just know that it works, at least in a limited capacity.

Sorry but I don't see a workaround for you at this time.

Joined: Dec 2002
Posts: 294
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 294
She may want the wildcards so that she can enforce spaces around the matchtext though. Normally the highlight feature does support wildcards if they are used. Perhaps a regex version would work.

Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
mirc's inbuilt highlight feature supports regex. She may be able to use the $highlight() identifier with an alias, $network = to return the match she wants.

S
StrawberryKitty
StrawberryKitty
S
That'd be great if I knew how I guess ^^;


Link Copied to Clipboard