mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2004
Posts: 148
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Nov 2004
Posts: 148
Is there any other way (for example smarter and faster) other than using the following alias:
/selectall @window

alias selectall {
var %a = 1
while (%a <= $line($1,0)) {
sline -a $1 %a
inc %a
}
}

Sline doesn't support multiple line selection (for example /sline @window 1-5), which is pitty. frown

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
(for example smarter and faster)


lol, love the scope limiting, so you didnt get slower and dopeyer methods!


I think this well be a fraction faster. But i doubt by much over all.

alias selectall { var %i = $line($1,0) | while (%i) { sline -a $1 %i | dec %i } }

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
This will work slightly faster:

alias selectall set -u %win $$1 | filter -wkn $1 _selectall
alias _selectall sline -a %win $1

Requires 6.16

Note that the longer the line of data in each line is, the slower it will become, so on long lines it actually performs identical to the while loop. On shorter lines it goes faster, though the difference is small.


Gone.
Joined: Nov 2004
Posts: 148
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Nov 2004
Posts: 148
So you are using filter-->alias

Still when using those methods I see it scrolling the window while selecting all the lines.
I think that it will be a nice addition to have /sline for multiple lines.
This way something like ctrl+A can be implanted easy.


And DaveC. Smarter and Faster will be like using COM and somehow using the windows ability to do CTRL+A (which doesn't work in mIRC), or one of those ways of screwing with mIRC by using DLLs (which I couldn't find any DLL which allows you to catch ctrl+a, or other key combination, but only to simulate/fake them, or any DLL which let you do a select all lines).

Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Try
Code:
alias selectall window -a $$1 | sendkeys {HOME}+{END}
alias sendkeys {
  var %a = sendkeys $+ $ticks 
  .comopen %a WScript.Shell 
  if !$comerr { .comclose %a $com(%a,SendKeys,3,bstr,$1-) }
}


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
You can obtain a big speed improvement by first hiding the window before scrolling through it. This way all the displaying code in mIRC is skipped. Drawback is that you can see it disapear shortly and that might frighten people smile

I'd go for qwerty's code, no long wait, no disappearing windows smile

Code:
alias selectall {
  window -h $$1
  set -u %win $$1 
  filter -wkn $1 _selectall
  window -r $1
}
alias _selectall sline -a %win $1 

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
I would also specify the w flag when restoring the window, so that it appears again in the switchbar.

Indeed, the sendkeys method is the fastest, and rightfully.


PS: I enrolled myself for Lessen van de 21e eeuw! :tongue:


Gone.
Joined: Nov 2004
Posts: 148
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Nov 2004
Posts: 148
Quote:
Try
Code:
alias selectall window -a $$1 | sendkeys {HOME}+{END}
alias sendkeys {
  var %a = sendkeys $+ $ticks 
  .comopen %a WScript.Shell 
  if !$comerr { .comclose %a $com(%a,SendKeys,3,bstr,$1-) }
}





NICEEEEEEEE......!!!!!!! laugh laugh laugh laugh

Thats what I was talking about!!!!!!
Marking the first raw, and, pressing shift and then marking the last raw.

Im familiar with the sendkey code, but I never though it will become usefull.... Untill now. Finaly I found a use for it laugh


Thanks....

Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Actually the -r does exactly what I wanted it to do. However, I intended to use /window -n to minimize the window instead of hiding it... crazy grin


ps: those seminars are sometimes even really interesting too! grin


Link Copied to Clipboard