mIRC Home    About    Download    Register    News    Help

Print Thread
#108854 22/01/05 11:53 PM
R
RockHound
RockHound
R
Is it possible to fine the lenght of one line using a script? if so how would i go about it?

Thanks in advance

#108855 22/01/05 11:56 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Do you mean the length of chars used in a string?

$len(Hello)
Returns 5

$len(Hello how are you doing today?)
Returns 30.

#108856 23/01/05 12:05 AM
R
RockHound
RockHound
R
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

#108857 23/01/05 12:26 AM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Most mIRC functions use up to 940 characters. For example: //say $str(a,946) works. $str(a,947) does not.

#108858 23/01/05 02:22 AM
D
DaveC
DaveC
D
do u mean max mirc line length or the max line length a channel or pm well accept ?

#108859 23/01/05 06:24 AM
R
RockHound
RockHound
R
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

#108860 23/01/05 11:12 AM
D
DaveC
DaveC
D
$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
    }
  }
}


Link Copied to Clipboard