mIRC Home    About    Download    Register    News    Help

Print Thread
Check string for highlight #226056 17/09/10 08:22 AM
Joined: Nov 2009
Posts: 81
V
Voglea Offline OP
Babel fish
OP Offline
Babel fish
V
Joined: Nov 2009
Posts: 81
How to fast check string for highlights?

Request snippet smile
Highlights sets in Alt + B "Highlight" dialog.

on ^&*:TEXT:*:#: {
; if highlight is turned on
if ($highlight) {
if ($check_for_highlight($1-)) {
echo highlight!
}
}
}

Re: Check string for highlight [Re: Voglea] #226057 17/09/10 08:55 AM
Joined: Jun 2007
Posts: 933
5
5618 Offline
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
See /help $highlight
Second entry: $highligh(N/text) returns a value if <text> matches a highlight.

Re: Check string for highlight [Re: Voglea] #226059 17/09/10 10:49 AM
Joined: Nov 2009
Posts: 81
V
Voglea Offline OP
Babel fish
OP Offline
Babel fish
V
Joined: Nov 2009
Posts: 81
oh. thanks

Re: Check string for highlight [Re: Voglea] #226063 17/09/10 03:22 PM
Joined: Feb 2006
Posts: 546
J
jaytea Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
assuming you don't have numerical highlight entries, you might also want to throw in an extra little check:

Code:
if ($1- !isnum) && ($highlight($1-)) { 




"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde