mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2016
Posts: 2
Z
Zaite12 Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
Z
Joined: Feb 2016
Posts: 2
Can anyone advise how I can shift+click on a name in the chat window and this does one of two things:

1. If I haven't started typing it inserts the name into the edit box and adds a colon afterwards.

2. I have already been typing it just inserts the name without a colon.

Thanks

Joined: Dec 2015
Posts: 148
Vogon poet
Offline
Vogon poet
Joined: Dec 2015
Posts: 148
As far as I know, there's no way to detected that, but there is double click command option for nick list, which you can customize.

Code:
alias myalias editbox -a $iif($editbox($active),$v1 $1,$1 $+ :) $+ $chr(160)


ALT+O --> Mouse --> Nick list --> myalias $$1

Joined: Jul 2006
Posts: 4,151
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,151
You can use the on hotlink event to know whenever you are clicking on a nickname, note that you must use a * matchtext first, which will make mIRC triggers the event any single time you move your mouse over text in chat.

Code:
on *:hotlink:*:#:{
  if ($hotlink(event) $hotlink(match).type == sclick nick) {
    var %n $remove($1,~,&,@,%,+,<,>)
    if ($editbox($chan) != $null) editbox -a $v1 %n
    else editbox -a $v1 %n $+ :
  }
}


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jul 2006
Posts: 4,151
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,151
I forgot to use halt to allow default processing on others situations (can't click links, for example):
Code:
on *:hotlink:*:#:{
  if ($hotlink(event) $hotlink(match).type == sclick nick) {
    var %n $remove($1,~,&,@,%,+,<,>)
    if ($editbox($chan) != $null) editbox -a $v1 %n
    else editbox -a $v1 %n $+ :
  }
else halt
}


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard