mIRC Homepage
Posted By: nataliad click on nick - 15/05/06 09:33 AM
hello

by default:

single clicking on a nick in the channel window (not in nicklist) mirc highlights (selects) the nick in the nicklist

how can I make mirc to write the nickname in the text-input bar whenever I single click on a nickname in the channel window?

thanks

PS: please note, double clicking on a nick in the channel window, opens new query for it, which I want to preserve it ofcourse
Posted By: DaveC Re: click on nick - 15/05/06 11:25 AM
As far as i know, you would have to completely replace the internal hotlink events for single click and double click i guess, and build in a nick matching system in the hotlink.
Im sure its already been done by someone but its a lot of work i would say.

here is a somewhat simple workaround.
and should work 95% of the time.

Code:
on *:connect:{ start.catch.nickselect.timer }
alias start.catch.nickselect.timer timer.catch.nickselect.for. $+ $cid -m 0 250 catch.nickselect.timer.alias
alias -l catch.nickselect.timer.alias {
  if ($chan($active)) {
    if ($snick($active,0) == 1) { 
      if ($($+(%,last.snick.for.,$cid,.,$active),2) != $snick($active,1)) {
        ;
        editbox -ap $snick($active,1)                    | ; replace editbox with selected nick and a space
        ;
        ;editbox -ap $editbox($active) $snick($active,1) | ; adds select nick and a space to end of editbox text
        ;
        ;editbox -ap $snick($active,1) $editbox($active) | ; adds select nick and a space to front of editbox text
        ;
      }
      set $+(%,last.snick.for.,$cid,.,$active) $snick($active,1)
    }
    else {
      set $+(%,last.snick.for.,$cid,.,$active) multiple,nicks
    }
  }
}


* you choose which of the 3 add nick styles you like

* if anyone knows how to get an event triggering when u click on the nick, shout out! becuase using a timer like i have is a resource hog.
Posted By: nataliad Re: click on nick - 15/05/06 08:48 PM
thank you very much

may I ask, the only thing I have to do is to paste the above code in my remote?

what does the '* you choose which of the 3 add nick styles you like' mean?

thanks
Posted By: chrischris Re: click on nick - 16/05/06 07:25 AM
He meant that you can choose in what way the nick should be added - just have a look at this code, and you'll see.
Posted By: nataliad Re: click on nick - 16/05/06 05:58 PM
so the above code is 3 scripts in one?

can anyone distinguish them please? and remove any unecessary things (the ; stuff) and add any necesary explanations at the end

thank you!
Posted By: DaveC Re: click on nick - 17/05/06 01:01 AM
see these 3 lines in the script

editbox -ap $snick($active,1) | ; replace editbox with selected nick and a space
;editbox -ap $editbox($active) $snick($active,1) | ; adds select nick and a space to end of editbox text
;editbox -ap $snick($active,1) $editbox($active) | ; adds select nick and a space to front of editbox text

the bottom two have been ; remarkde out, so dont run, thus only the first one is selected.
If you dont like the first one, put a ; at the start, and remove it from one of the other 2
Posted By: nataliad Re: click on nick - 17/05/06 01:28 PM
thanks

it seems to work ok!

but it says everytime I connect
* Timer .catch.nickselect.for.3 activated

it seems like a sys resource hog
Posted By: nataliad Re: click on nick - 17/05/06 04:36 PM
unfortunatelly I found a problem

it works even if I click on the nick list so searching among the nick list using the keyboard results in having too many nicknames in my editbox, can it be disabled for the nick list and make it work only for the nicks in the room?

moreover, can we make it remove the nickname from the editbox if I click on a non-nickname space in a room ?

thanks
Posted By: DaveC Re: click on nick - 17/05/06 11:55 PM
Quote:
but it says everytime I connect
* Timer .catch.nickselect.for.3 activated

alias start.catch.nickselect.timer timer.catch.nickselect.for. $+ $cid -m 0 250 catch.nickselect.timer.alias
replace with
alias start.catch.nickselect.timer .timer.catch.nickselect.for. $+ $cid -m 0 250 catch.nickselect.timer.alias

Quote:
it seems like a sys resource hog

It is.

Quote:
it works even if I click on the nick list so searching among the nick list using the keyboard results in having too many nicknames in my editbox, can it be disabled for the nick list and make it work only for the nicks in the room?

no. It uses the fact that the nick list changes to trigger the change in the editbox.

Quote:
moreover, can we make it remove the nickname from the editbox if I click on a non-nickname space in a room ?

no. It doesnt know what you click on in the room, it simply sees a change in the nicklist and responds to that.
Posted By: nataliad Re: click on nick - 18/05/06 03:21 PM
maybe make it delete the nickname in the editbox when double clicking on the nick ?
© mIRC Discussion Forums