mIRC Homepage

Add ":" and " " (space) after nick completion with

Posted By: meow81

Add ":" and " " (space) after nick completion with - 18/05/21 09:12 PM

How can add ":" and " " (space) after nick completion with TAB ?
Posted By: turbosmurfen

Re: Add ":" and " " (space) after nick completion with - 26/05/21 08:31 PM

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
  }
}
Posted By: maroon

Re: Add ":" and " " (space) after nick completion with - 27/05/21 09:25 AM

//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 }
}
Posted By: meow81

Re: Add ":" and " " (space) after nick completion with - 27/05/21 11:07 AM

where must be pasted
//tokenize 32 mAroon test | if (($1 !isnum) && ($nick($chan,$1))) echo -a $+($1,:) $2-
?
in aliases ?
Posted By: meow81

Re: Add ":" and " " (space) after nick completion with - 27/05/21 05:35 PM

look in the status:
[19:34] *:{ Unknown command
Posted By: meow81

Re: Add ":" and " " (space) after nick completion with - 27/05/21 05:36 PM

Your snippet doesn't work to me.
Posted By: maroon

Re: Add ":" and " " (space) after nick completion with - 27/05/21 06:10 PM

That was just a test command that accidentally got pasted. I put the code into the code-block
Posted By: Epic

Re: Add ":" and " " (space) after nick completion with - 27/05/21 06:14 PM

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.
Posted By: maroon

Re: Add ":" and " " (space) after nick completion with - 27/05/21 07:08 PM

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 }
}
Posted By: meow81

Re: Add ":" and " " (space) after nick completion with - 27/05/21 07:11 PM

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-
Posted By: meow81

Re: Add ":" and " " (space) after nick completion with - 27/05/21 07:28 PM

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.
Posted By: meow81

Re: Add ":" and " " (space) after nick completion with - 27/05/21 07:36 PM

Ok now it works, i had to disable a acronym snippet to make it work.
Posted By: meow81

Re: Add ":" and " " (space) after nick completion with - 28/05/21 12:57 AM

now works that too
Posted By: meow81

Re: Add ":" and " " (space) after nick completion with - 28/05/21 11:34 AM

how to make it also for a nick that is not the first word of a phrase ?
© 2021 mIRC Discussion Forums