mIRC Homepage
Posted By: Chandler Aligning text - 28/05/03 12:01 PM
Does some1 knows how to align inputed text and text said by others?

I use:
Code:
on ^*:TEXT:*:#: {
  echo $color(normal text) -tlmi2 $chan < $+ $nick $+ > $+ $char(9) $+ $char(9) $strip($1-,m)
  haltdef
}

So i want that every lign includes two tabs so that the text in the channel are aligned to the left after the nick. Like this:
Code:
<Chandler>      Hi all
<somelongern>   Hi Chandler 
Posted By: ScatMan Re: Aligning text - 28/05/03 12:19 PM
that is imposible in channel windows, u can do that only with custom windows.
there is a way to do that with $chr(160) like $str($chr(160),8)
Posted By: theRat Re: Aligning text - 28/05/03 12:45 PM
$str($chr(160),$calc(10 - $len($nick)))
Posted By: Chandler Re: Aligning text - 28/05/03 01:14 PM
Ok, it almost is like i want it too, but there has to be something else, so that behind every nick he uses the same space...

Like in my example... What TheRat suggested puts the text at a certain space from the nick, but when the nick is longer, he put's it further away. Isn't there a command that finds the longest nick? confused grin
Posted By: ScatMan Re: Aligning text - 28/05/03 01:37 PM
the length of the nick is $len($nick)
Posted By: Chandler Re: Aligning text - 28/05/03 02:58 PM
That i allready knew :tongue:

I want someting that can find the longest nick in the chan... ie. Chandler, someothernick and Scatman are in channel #nick, then i would like that a script would find that someothernick is the longest one, puts it in a variable and puts it in the
Code:
*,$calc(10-%variable)
Posted By: theRat Re: Aligning text - 28/05/03 03:33 PM
You can look for the NICKLEN param in RAW 005
Posted By: Nimue Re: Aligning text - 28/05/03 03:50 PM
...and if it not present, assume 9.
Posted By: Chandler Re: Aligning text - 28/05/03 04:55 PM
Thnx for the tips
Posted By: NaquadaServ Re: Aligning text - 28/05/03 09:13 PM
ScatMan, You can use $chr(160) in a channel window...
© mIRC Discussion Forums