mIRC Homepage
Posted By: RockHound line lenght - 22/01/05 11:53 PM
Is it possible to fine the lenght of one line using a script? if so how would i go about it?

Thanks in advance
Posted By: SladeKraven Re: line lenght - 22/01/05 11:56 PM
Do you mean the length of chars used in a string?

$len(Hello)
Returns 5

$len(Hello how are you doing today?)
Returns 30.
Posted By: RockHound Re: line lenght - 23/01/05 12:05 AM
Not the character count but the amount of character that I would be able to fit on one line including spaces before it starts on the second line.

Hope this is understand able
Posted By: SladeKraven Re: line lenght - 23/01/05 12:26 AM
Most mIRC functions use up to 940 characters. For example: //say $str(a,946) works. $str(a,947) does not.
Posted By: DaveC Re: line lenght - 23/01/05 02:22 AM
do u mean max mirc line length or the max line length a channel or pm well accept ?
Posted By: RockHound Re: line lenght - 23/01/05 06:24 AM
The amount of character that can be stuffed between the left side and nicklist but on oine line. because the nick list size can be changed it is hard for me to count the amout of character that will fit on each line. I do not think it can be done and is why im asking
Posted By: DaveC Re: line lenght - 23/01/05 11:12 AM
$window(windowname).dw (width in pixels of the text area)

then use $wrap

heres a starter to get ya off the ground
Code:
; $1  = windowname
; $2- = text
/dw {
  if ($window($1) == $1) {
    var %i = 1
    while ($wrap($2-,$window($1).font,$window($1).fontsize,$window($1).dw, 0, %i)) {
       echo $iif($1 == Status Window,-s,$iif($1 == Message Window,-d,$1)) [ $ifmatch ]
       inc %i
    }
  }
}
© mIRC Discussion Forums