mIRC Home    About    Download    Register    News    Help

Print Thread
#108854 22/01/05 11:53 PM
Joined: Oct 2003
Posts: 80
R
Babel fish
OP Offline
Babel fish
R
Joined: Oct 2003
Posts: 80
Is it possible to fine the lenght of one line using a script? if so how would i go about it?

Thanks in advance


RockHound
#108855 22/01/05 11:56 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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
Joined: Oct 2003
Posts: 80
R
Babel fish
OP Offline
Babel fish
R
Joined: Oct 2003
Posts: 80
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


RockHound
#108857 23/01/05 12:26 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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
Joined: Oct 2003
Posts: 80
R
Babel fish
OP Offline
Babel fish
R
Joined: Oct 2003
Posts: 80
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


RockHound
#108860 23/01/05 11:12 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
$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