mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2012
Posts: 8
K
kkrotto Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
K
Joined: May 2012
Posts: 8
Hello, I'd like to know how could I do a script that autotype and complete the $nick that mention my nickname on a channel.

So, I would be ready to reply him/her immediately.


mIRC 7.68 version here

Joined: Jan 2004
Posts: 1,990
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,990
There are other ways to do it, but here's 1 way I described here:
https://forums.mirc.com/ubbthreads.php/topics/270188/enhanced-highlight-capabilities

Joined: May 2012
Posts: 8
K
kkrotto Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
K
Joined: May 2012
Posts: 8
thank you very much maroon

Joined: Dec 2002
Posts: 245
T
Fjord artisan
Offline
Fjord artisan
T
Joined: Dec 2002
Posts: 245
Code
on *:TEXT:*:#: { if ($highlight($1- $lf) != $null) { editbox -p # $nick $+ : } }


This should do the trick. Depending on your highlights, it might not. You'll have to search the forums, there's been several discussions about the poor implementation of $highlight() and all the drawbacks of ways to determine if/when a highlight occured. Since this also allows iterating highlights, a "number" could return a false result, being the highlight at position N in your highlights should "$1-" be a number. Hence the dirty work-around of "$lf" added into the check to prevent this. This could break regex matches with line anchors like /^something$/, so again it's not perfect. If i remembered the thread i would've posted a link, my vague search for $highlight had far too many results I got tired of sifting to find the thread with all the information and gripe about $highlight() smile

For a general highlight entry in "/abook -h" such as normal match (non-regex) containing words: "$me" this would most likely suffice just fine.

Quote

$highlight(N/text)
Returns the Nth line in the highlight listbox, or if text is specified, returns the properties for the highlight line that matches text.
Properties: text, color, sound, flash, message, nicks, regex, cs, chans


Link Copied to Clipboard