mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2013
Posts: 23
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 23
How can add ":" and " " (space) after nick completion with TAB ?

Joined: Jan 2021
Posts: 33
T
Ameglian cow
Offline
Ameglian cow
T
Joined: Jan 2021
Posts: 33
It was a long time ago I made scripts. This code works great for me.
The code could take longer times in channels that have many users.
If someone else could come up with a better way, that would be nice.

Code
on 1:INPUT:#:*:{
  var %totalNicks = $nick($chan,0)
  %inc = 1
  while(%inc < %totalNicks) {
    if ($nick($chan,%inc) == $1) {
      say $+($1,:,$chr(32)) $2-
      haltdef
    }
    inc %inc
  }
}

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
//tokenize 32 mAroon test | if (($1 !isnum) && ($nick($chan,$1))) echo -a $+($1,:) $2-

Code
on *:INPUT:#:*:{
  if (($1 !isnum) && ($nick($chan,$1))) { say $+($1,:) $2- | haltdef }
}

Joined: Mar 2013
Posts: 23
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 23
where must be pasted
//tokenize 32 mAroon test | if (($1 !isnum) && ($nick($chan,$1))) echo -a $+($1,:) $2-
?
in aliases ?

Joined: Mar 2013
Posts: 23
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 23
look in the status:
[19:34] *:{ Unknown command

Joined: Mar 2013
Posts: 23
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 23
Your snippet doesn't work to me.

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
That was just a test command that accidentally got pasted. I put the code into the code-block

Joined: Jan 2012
Posts: 323
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 323
Originally Posted by meow81
where must be pasted
//tokenize 32 mAroon test | if (($1 !isnum) && ($nick($chan,$1))) echo -a $+($1,:) $2-
?
in aliases ?

This is a test command. You can paste this line into the command line of the channel (Editbox) and click on the "Enter" to check how this code sets the colon after the specified nickname.
The only error is that what is most likely there is no user on your network with a nickname "mAroon" on the channel you are checking.
Therefore, you can replace this nickname with an identifier that will display your own nickname "$me":

Code
//tokenize 32 $me test | if (($1 !isnum) && ($nick($chan,$1))) echo -a $+($1,04:) $2-

Note: The result of this test will be visible only to you.


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
I blindly copied the event handler you posted, assuming you had it correct. The :#: field doesn't belong there, and it works without it:

Code
on *:INPUT:*:{
  if (($1 !isnum) && ($nick($chan,$1))) { say $+($1,:) $2- | haltdef }
}

Joined: Mar 2013
Posts: 23
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 23
in the last version of mirc .in the status

[21:10] 32 Unknown command

if you use that command
//tokenize 32 $me test | if (($1 !isnum) && ($nick($chan,$1))) echo -a $+($1,04:) $2-

Joined: Mar 2013
Posts: 23
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 23
doesn't work to me
//tokenize 32 $me test | if (($1 !isnum) && ($nick($chan,$1))) echo -a $+($1,04:) $2-
it has some conflicts with other snippets in the mirc scripts editor installed.

Joined: Mar 2013
Posts: 23
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 23
Ok now it works, i had to disable a acronym snippet to make it work.

Joined: Mar 2013
Posts: 23
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 23
now works that too

Joined: Mar 2013
Posts: 23
M
meow81 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2013
Posts: 23
how to make it also for a nick that is not the first word of a phrase ?


Link Copied to Clipboard