|
Joined: Jan 2005
Posts: 75
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 75 |
Regards to the post about wrap a few threads below, i'm now having problems with the same thing slightly modified, i want a wrap alias that i can add to anything (see below) alias _wrap {
haltdef
var %i = 1
while ($wrap($2-,ProFontWindows, 6,475, 0, %i)) {
echo $1 $ifmatch
inc %i
}
}
on ^1:NOTICE:*:?:{
if (DCC Send isin $1-) || (DCC chat isin $1-) { halt }
_wrap $active 00- $+ 11 $+ $nick $+ 00(14 $+ $replace($address,@,11@14,.,11.14,-,11-14) $+ 00)-15 $1-
halt
}
that's just an example of what i thought would work, but it doesn't any help would be great.
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
remove the haltdef in _wrap (not that that should stop it, its just not needed) also might want to add to _wrap
alias _wrap {
if ($1-2 == Status Window) { tokenize 32 -s $3- }
elseif ($1-2 == Message Window) { tokenize 32 -d $3- }
var %i = 1
while ($wrap($2-,ProFontWindows, 6,475, 0, %i)) {
echo $1 $ifmatch
inc %i
}
}
Last edited by DaveC; 14/01/05 04:11 PM.
|
|
|
|
Joined: Jan 2005
Posts: 75
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 75 |
Yeah i just noticed that, but it's still not actually wrapping the text
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
Sorry i just edited my reply see above ^^^ try changing the 475 to a smaller number like 50, and see if that wraps, then increase it slowly tell its the right size u want, thats 475 pixels remeber.
|
|
|
|
Joined: Jan 2005
Posts: 75
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 75 |
Ok, i took a pic, i've played with the '475' but as you see, makes no odds lol, i hate wrap.. :tongue: Click This
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
that is wrapped Else the sssss would go as far across the screen as the top ones. are you trying to make the following appearence?
suchand such : tessssssssssssssss
ssssssssssssssssss
ssssssssssssssssss
sssssssst
(hope that comes out right on your screen) basicly a text on the left of the first line then etxt on the right of it but ever following line is spaces and text on the right, inline with the 1st lines right hand side text?
|
|
|
|
Joined: Jan 2005
Posts: 75
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 75 |
ya like that notice : Marantz tessssssssssssssss
: ssssssssssssssssss
: ssssssssssssssssss
: sssssssst i just thought that consider in use $str($chr(160),23) all the time, that a universal wrap alias was possible for notices/snotices and all things like that
Last edited by ztnaraM; 14/01/05 04:53 PM.
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
I wrote this for you (and myself) you DONT call it as a alias ie /_wrap u call it as an identifier but u can put it on a line of its own since it doesnt return anything ie: $_wrap($active,$nick said :,300,$1-) I tried it a few times, the text stays pretty well in line, but with fonts with differnt character sizes you can never always stay in line.
;
; $_wrap(window,fixedtext,wraptextsize,text)
; window = the window its to display in
; fixedtext = the text for the lefthand side on 1st line
; wraptextsize = the pixel width of the wrapping text
; text = the text to wrap on the righthand side
;
alias _wrap {
var %window = $iif($window($1),$1,$active)
var %fixedtext = $2
var %textsize = $iif($calc($3 * 1) <= 0,100,$calc($3 * 1))
var %i = 1
while ($wrap($4-,$window(%window).font,$window(%window).fontsize,%textsize,0,%i)) {
echo $iif(%window != Status Window,$iif(%window != Message Window,%window,-d),-s) %fixedtext [ $ifmatch ]
if (%i == 1) {
var %width = $calc($width(%fixedtext,$window(%window).font,$window(%window).fontsize,0,1) + 2)
var %fixedtext = $wrap($str($chr(160),800),$window(%window).font,$window(%window).fontsize,%width,0,1)
}
inc %i
}
}
oh it goes a bit dodgy if you dont have a FIXEDTEXT, but then if u dont u shouldnt be using this. edit/added this bit so you could see how it works...
on ^1:NOTICE:*:?:{
if (DCC Send isin $1-) || (DCC chat isin $1-) { halt }
$_wrap($active,NOTICE 00- $+ 11 $+ $nick $+ 00(14 $+ $replace($address,@,11@14,.,11.14,-,11-14) $+ 00)-15 ,475,$1-)
halt
}
Last edited by DaveC; 14/01/05 06:39 PM.
|
|
|
|
Joined: Jan 2005
Posts: 75
Babel fish
|
OP
Babel fish
Joined: Jan 2005
Posts: 75 |
lol magic, i didn't see you had edited it, but already got it working, and it works perfectly it's damn sweet, i can rest now until i come across a new problem, cheers DaveC
|
|
|
|
|