mIRC Home    About    Download    Register    News    Help

Print Thread
$wrap #95666 26/08/04 11:01 AM
Joined: Mar 2003
Posts: 160
Marantz Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Mar 2003
Posts: 160
Ok, just decided to try out $wrap, had a look, seemed straight forward, but any sentence that is tool long, just gets cut off, not pushed to the next line..
Code:
on 1:INPUT:#:{
  if ($left($1,1) != /) { 
    haltdef
    raw -q privmsg $active : $+  $1-
  echo $chan 13< $+ $xnick($me) $+ 13> $+ $wrap($strip($1-),IBMPC,9,400,1) | halt }
}

alias xnick {
  var %a $iif($2,$2,$chan),%b $iif($1 !isreg %a,$left($nick(%a,$1).pnick,1)) $+ $1
  return $str(,$calc(11 - $len(%b))) $+ $iif($1 !isreg %a,$+(11,$left(%b,1),15,$mid(%b,2,10)),$+(15,$mid(%b,1,11)))
}  


am i missing something? confused

Re: $wrap #95667 26/08/04 02:02 PM
Joined: Aug 2003
Posts: 314
S
Sigh Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
Yes, $wrap only returns one line at a time. You need to loop through $wrap(.....,N) where that will return the Nth line. N = 0 returns number of lines