mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2004
Posts: 3
C
Cresso Offline OP
Self-satisified door
OP Offline
Self-satisified door
C
Joined: May 2004
Posts: 3
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

Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
How is this a bug? You are counting the number of lines, the line marker takes up a line.

Joined: Dec 2002
Posts: 266
Z
Fjord artisan
Offline
Fjord artisan
Z
Joined: Dec 2002
Posts: 266
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.


You won't like it when I get angry.
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
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.

Joined: Dec 2002
Posts: 266
Z
Fjord artisan
Offline
Fjord artisan
Z
Joined: Dec 2002
Posts: 266
A nice $window().line feature could return the line number which the line marker occupies, $null if it isn't active.


You won't like it when I get angry.
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
Sounds good to me, not that i would ever use it but i'm sure someone will find it useful smile

Eamonn.

Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
* Armada claps at qwerty's brillance


Link Copied to Clipboard