|
Joined: Dec 2002
Posts: 59
Babel fish
|
OP
Babel fish
Joined: Dec 2002
Posts: 59 |
It would be helpful if multiple nicknames could be selected on the nicklist by holding control and clicking people's nicks from where they have spoken in the channel.
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
A work around could be made, but i dont know how to detect the ctrl key being down in a channel
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
A work around could be made, but i dont know how to detect the ctrl key being down in a channel if ( $mouse.key & 2 ) { dostuff }
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
Wooohooo I learnt something today, that makes my boring life almost seem bearable Well ok you cant do it quite right (well i couldnt, well to be exact im watching tv, so have stopped trying) this is as far as i got on ^*:hotlink:*:#:{
if ($mouse.key !& 2) { halt }
var %result, %temp = $regsub($1-,/[^[:alnum:]\-\[\\\]\^\_\`\{\|\}]/g,$chr(32),%result), %result = $remove(%result,$chr(32))
if (!$nick($chan,%result)) { halt }
}
on *:hotlink:*:#:{
if ($mouse.key !& 2) { halt }
var %result, %temp = $regsub($1-,/[^[:alnum:]\-\[\\\]\^\_\`\{\|\}]/g,$chr(32),%result), %result = $remove(%result,$chr(32))
if (!$nick($chan,%result)) { halt }
sline $iif($line($chan,$fline($chan,%result,1,1),1).state,-r,-a) $chan %result
} You hold the ctrl key down and double click on a nick and it should add it into the selected nicks (or remove it if its altready selected) Its pretty close, but not quite exactly what is wanted.
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
Here's a script that works exactly like the OP wanted, ie select with Ctrl + single click. I also changed the nick recognition method a bit to make it more like mirc's internal method (for example, mirc recognizes <nick> but not <<nick>>, your method recognizes both). Note that I use only the first on HOTLINK event (the one with the ^ prefix). on ^*:hotlink:*:#:{
if $mouse.key !& 2 { halt }
if $1 ison # { var %nick = $1 }
else {
if !$regex($1,/^([^\w\\{}^`[\]-])([\w\\{}^`[\]-]+)(?1)?$/) || $regml(2) !ison # { halt }
var %nick = $v1
}
var %w = $+(%,hotlinksclick,$chan(#).wid)
if $mouse.key & 1 { set -u10 $(%w) 1 }
elseif $(%w,2) {
unset $(%w)
sline $iif($line(#,$nick(#,%nick),1).state,-ar,-a) # %nick
}
} Regardless, I'd also like that feature built-in.
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
hmm nice, i didnt even notice theres a ^HOTLINK event when the mouse is clicked and released, i assumed (that word again) the clicks produced HOTLINK events only. And that the mouse movement produced the ^HOTLINK I couldnt work out why you were bothering to set a flag to say you just clicked down the mouse with the ctrl key, then apon release you set the nick? I just ended up with adding/or removing the nick when you click with ctrl on ^*:hotlink:*:#:{
if ($and($mouse.key,3) != 3) { halt }
if $1 ison # { var %nick = $1 }
else {
if !$regex($1,/^([^\w\\{}^`[\]-])([\w\\{}^`[\]-]+)(?1)?$/) || $regml(2) !ison # { halt }
var %nick = $v1
}
sline $iif($line(#,$nick(#,%nick),1).state,-ar,-a) # %nick
} Was there a reason for the delay to on mouse release i didnt perceive? I noticed it allowed you to ctrl-click on nick1 move to nick2 and release and you get nick2 added/removed, which i thought was kinda right and kinda wrong, prefrence i guess. I was going to change back to my regex but kept yours becuase it looks funny when i use mine, becuase the finger doesnt appear over <<nick>> but if i hold ctrl down and click it it still works LOL. You are right of course it couldbe/shouldbe built in.
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
I sort of copied a script I wrote a year ago, making some, mostly aesthetic, adjustments without even thinking of revising the method. Back then, the reason I used a variable was to make it trigger on uclick and not sclick (like yours does atm). In the case of nick selections though, one doesn't have to use uclick; in fact sclick is better, since it's the default selection behaviour in listboxes anyway (and there's another, very unimportant glitch which I won't bother to describe). So yeah, your final script seems to be the ideal solution here.
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Dec 2002
Posts: 59
Babel fish
|
OP
Babel fish
Joined: Dec 2002
Posts: 59 |
|
|
|
|
|