mIRC Homepage
Posted By: Steven8604 aligning text - 11/10/05 05:53 AM
I'm having difficulties aligning text on input and on text


e.g.

<nickname1> sjflksjflkjaflkajsdlfkajfdlkjaldfkjalkdjflaksjdflkjasdfj
...................fdjglkdjgsljglskdjlgksdjlkfjg

<nickname2> lkdjglksjdglkjsdljgslkjfglksjdlkgjsldkjgflksjdkgjsdjgg
...................gjlkjglksjdlkgsjdlkgjs

Without the ......................... on the second line tho...

can anyone help ? thanks laugh
Posted By: Lpfix5 Re: aligning text - 11/10/05 06:45 AM
Well you cant really seperate or align the text for others to view unless a chr command is entered other wise.. no go

for the char command just add $chr(416) << i believe this is empty space im about 95% sure

so use or do this has an example to your channel..

//say $chr(416) $chr(416) $chr(416) $chr(416) $chr(416) $chr(416) $chr(416) hi

make sure to include both slashes before say otherwise youll be pasting the text itself in channel rather the performing the $chr command action

use more $chr(416) has you go hope this is what your sorta looking for..

it will create a large space as much as you need between text not only through your eyes but others too

im almost sure though your requesting more along the lines of actually aligning all like from here to here and there to there..

IM not sure if the post will allow to show you what i think you mean but here it goes

<dave> hi I love to do fishing
and I love to golf.

instead of <dave> hi I love to do fishing and I love to golf.

or <dave> hi I love to do fishing
and I love to play golf
Posted By: sCHuTt Re: aligning text - 11/10/05 07:54 AM
TBH, i'd like to see this script when it's finished plz, started many times on something similar but always managed to get it upside down. So I gave up lmfao.

- sChutt
Posted By: hixxy Re: aligning text - 11/10/05 07:56 AM
There's only 255 characters available through $chr(), so 456 is NOT a space. $chr(160) is in many fonts.

Original poster: use the /echo -i switch or use $wrap.
Posted By: FiberOPtics Re: aligning text - 11/10/05 08:11 AM
$chr can be referenced with any number really, it'll always start again with ascii 1 at 256, at 511 etc.

So $chr(416) = $chr(160)

But anyway as you said, it's not a hard space on all fonts, and is the least preferred method.
Posted By: Mpdreamz Re: aligning text - 11/10/05 09:20 AM
also be sure to use a monospaced font this ensures correct alignment.
Posted By: hixxy Re: aligning text - 11/10/05 09:23 AM
Ah I see. Well it seems pretty pointless to use a number above 255 to me.
Posted By: Kelder Re: aligning text - 11/10/05 11:23 AM
$chr(256) would be $chr(0) but it doesn't really output much... Normal range is be 0-255, but 256-511, 512-767, etc give same letters.

For OP: as said before, haltdef the default text and use /echo -i to display your own
This should get you started:
Code:
on ^*:TEXT:*:#:{
  haltdef
  var %len = $len($timestamp &lt;&gt; $nick)
  echo -mbflri $+ %len $timestamp $+(&lt;,$nick,&gt;) $1-
}
Posted By: Lpfix5 Re: aligning text - 11/10/05 04:26 PM
not only is there those ranges for chr ascii but theres a forgotten range

982-1300 < $chr(1293) is like saying /RAW

so $CHR(1293) quit would be /raw quit
Posted By: FiberOPtics Re: aligning text - 11/10/05 04:42 PM
Um no.

$CHR(1293) = $crlf = $chr(13)

You can check out this social engineering exploit thread to see how $crlf (or $lf, which is $chr(10)) is used to send multiple commands to the server at once.

As an example:

//raw privmsg # :bla $+ $crlf $+ notice # :hehe
Posted By: Lpfix5 Re: aligning text - 11/10/05 06:28 PM
oops your right sorry about that it is crlf
Posted By: Om3n Re: aligning text - 12/10/05 01:28 AM
I posted an example of how to do this Here, however my example is limited only to on text event.
Somebody else also wrote a similar script to include other events and such, check out Message Extentions
© mIRC Discussion Forums