mIRC Homepage
Posted By: Cresso $line reporting incorrect linenumbers - 04/11/04 04:35 AM
When counting lines for a window with the linemarker displayed in it, it will count the lines including the linemarker.

There's no way to tell wether the linemarker is either turned on or off, so you'll never know precisely how many lines there are in a certain window with a possible linemarker enabled.

Command:
$line(windowname,0)

Another effect of this is that it will return nothing when there is a linenumber specified where a linemaker has it's position..

Command:
$line(windowname,1)

_______________________________________________
Using mIRC 6.16
Posted By: Armada Re: $line reporting incorrect linenumbers - 04/11/04 07:54 AM
How is this a bug? You are counting the number of lines, the line marker takes up a line.
Posted By: zack Re: $line reporting incorrect linenumbers - 04/11/04 01:33 PM
But the line marker takes up a line, and holds no data.

Code:
//var %a 1 | while $line(#,%a) != $null { echo -s $v1 | inc %a }


If the line marker is turned on in the channel, the script halts at the line marker. This IS a bug.
Posted By: Coolkill Re: $line reporting incorrect linenumbers - 04/11/04 01:42 PM
I think is point is the fact that, $line is suppose to read directly from the window, and thus when line marker is enabled, it takes up an addition line, it would hardly say 'THIS IS A LINE MARKER', when you read it though.

Although, it would be nice to be able to tell simple if the line marker was on/off.

Eamonn.
Posted By: zack Re: $line reporting incorrect linenumbers - 04/11/04 04:10 PM
A nice $window().line feature could return the line number which the line marker occupies, $null if it isn't active.
Posted By: Coolkill Re: $line reporting incorrect linenumbers - 04/11/04 04:18 PM
Sounds good to me, not that i would ever use it but i'm sure someone will find it useful smile

Eamonn.
Posted By: qwerty Re: $line reporting incorrect linenumbers - 04/11/04 07:26 PM
Code:
$fline(windowname,^$,1,2)
works exactly like the hypothetical $window().line. The reason it works is that the line marker is actually an empty line; this is the only way to have an empty line in a mirc window: even when you /loadbuf files with empty lines, those are converted to a single space. So, scanning the window for an empty line is an accurate way of finding the line marker.
Posted By: Armada Re: $line reporting incorrect linenumbers - 04/11/04 09:08 PM
* Armada claps at qwerty's brillance
© mIRC Discussion Forums