mIRC Home    About    Download    Register    News    Help

Print Thread
Autotype $nick on input text bar when mention me #270181 17/04/22 03:34 AM
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

Re: Autotype $nick on input text bar when mention me [Re: kkrotto] #270189 17/04/22 06:30 PM
Joined: Jan 2004
Posts: 1,769
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,769
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

Re: Autotype $nick on input text bar when mention me [Re: maroon] #270191 17/04/22 10:54 PM
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

Re: Autotype $nick on input text bar when mention me [Re: kkrotto] #270195 18/04/22 06:36 PM
Joined: Dec 2002
Posts: 235
T
Talon Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Dec 2002
Posts: 235
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