mIRC Home    About    Download    Register    News    Help

Print Thread
#96067 29/08/04 12:34 PM
Joined: Dec 2003
Posts: 28
L
LEET Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Dec 2003
Posts: 28
Hi,

I've been using $wrap in my script to wrap people's messages in the channel window nicely.

The only problem I have is retrieving the correct 'width' I need to display the text correctly say after the user has changed the width of the nicklist..

I use identifiers for the other parms for the $wrap eg..
$wrap(text, font, size, width, [word,] N)
$wrap(text,$window(#).font,$window(#).fontsize,400,N)
but at the moment i'm just using 400 as the width.

Can someone help me and explain what width i'd need to specify, I found $window(#).dw which is the number of pixels width in the display area. but i don't know how many pixels wide each font is...

Any suggestions are welcome.


blush


I R WITH STUPID -> LEET
#96068 29/08/04 01:06 PM
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
mIRC has, $width()

$width([color:red]text,font,size,B,C)[/color]

Where, text is the sentence, font is the font your using, size is the size of the font, you can use a negative number and it will use the size that is selected in the /font dialog.

If B is anything but 0 it will assume the text is in BOLD, and if C anythiing but 0 it will process the control codes in the sentence. (They are both optional parmeters also).

See, /help $width for more information.

Eamonn.

#96069 29/08/04 01:59 PM
Joined: Dec 2003
Posts: 28
L
LEET Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Dec 2003
Posts: 28
cheers, ur a life saver grin


I R WITH STUPID -> LEET

Link Copied to Clipboard