mIRC Home    About    Download    Register    News    Help

Print Thread
#185669 12/09/07 01:31 PM
Joined: Nov 2004
Posts: 822
J
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
J
Joined: Nov 2004
Posts: 822
This *might* be a bug, I'm not 100% sure ...

Anyway, I have my window buffer set to 5000 in options, but when I do //echo -s $line($active,0) it returns 4914 or a few less. (E.g 4908.)

This is the point of where the top lines are being cleared.


Tested on mIRC 6.3.

Jigsy #185684 12/09/07 05:14 PM
Joined: Jul 2006
Posts: 4,020
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,020
I've tested on mIRC 6.21, (buffer set to 5000), it's work fine.I don't have mIRC 6.3 so i can't test but i use this code on 6.21 :

Code:
//clear | Var %a 5000 | while (%a) { echo -a %a : $line($active,0) | dec %a } | .timer -m 2 0 echo -a some line : $!line($active,0)




#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #185727 13/09/07 06:41 AM
Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Code:
alias testbuffer {
  clear 
  var %a = $gettok($readini($mircini, options, n3), 1, 44)
  while (%a) {
    echo -a %a : $line($active,0)
    dec %a
  }
  .timer -m 2 0 echo -a some line : $!line($active,0)
}

This works fine on 6.3 in a custom window, channel window and status window.

This is with a 30,000 line buffer.

Jigsy #185738 13/09/07 11:24 AM
Joined: Dec 2002
Posts: 3,840
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 3,840
There may be a discrepancy between $line() and the window buffer size because wrapped lines are counted differently in these routines. Also, since lines are wrapped on-the-fly ie. only when they are actually visible, there may be a further discrepancy. The window buffer size is mainly used to limit memory usage for users who need it, so it's really a round-about number, not a precise line count.

Khaled #185744 13/09/07 12:04 PM
Joined: Nov 2004
Posts: 822
J
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
J
Joined: Nov 2004
Posts: 822
Ah, right.

Guess that explains it.

Thanks.


Link Copied to Clipboard