Skip to content
General IRCX

Aligning The Output

A TG007 community discussion started by sugarboy.

Discussion 4 posts
Page 1 of 1
Open
Topic #14816 · 4 published posts · 2,455 views

I have been playing around today with sockets, just to build up some experience with them before I move on to something else so I set up a xml document on my web server with a few lines of code. Then socket than retrieves the information from within that document and displays them like such.

Cigarettes: Newport

Music: Electro/House

Drink: Jager

 

(Just some random values Lol.)

What I am trying to do is make the values like Newport, Electro/House, & Jager align with each other. So it would look a more organized I guess you would say. Kinda like this

Posted Image

I tried inserting extra spaces between the static text of the echo and the variable(which would be newport, electro/house, & Jager) but that doesn't seem to work much.

 

Can anyone suggest to me a possible way to achieve this? I would greatly appreciate it.

 

Also if it helps this is basically what I am using for the echo.

if ($regex(%temp,/<cigarettes>(.*)</cigarettes>/)) {
  echo -a Cigarettes: $regml(1)
}

*Insert interesting signature here*

set them as %vars then once your done reading from the socket or on sockclose have them echo like..

 

Cigarettes: %var1

Music: %var2

Drink: %var3

 

only way i can think of off hand

 

 

woops, read what you wanted wrong lol.. you'll prolly need a font that aligns proper, like Lucida Console etc.. then calc the len of the text then add or subtract some chr 160's etc lol, lot of work :P or try the spaces dll

Edited Dec 19, 2010 1:51 PM by Zantetsuken

Thanks mate. That did the trick.

*Insert interesting signature here*

You can make the window a listbox and seperate it with columns (-t).

 

/help /window

 

Seperate the columns with $chr(9). Column1 $chr(9) Column2 $chr(9) Column3.