sugarboy Posted December 19, 2010 Report Share Posted December 19, 2010 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 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) } Link to comment Share on other sites More sharing options...
Guest Zantetsuken Posted December 19, 2010 Report Share Posted December 19, 2010 (edited) 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 or try the spaces dll Edited December 19, 2010 by Zantetsuken Link to comment Share on other sites More sharing options...
sugarboy Posted December 19, 2010 Author Report Share Posted December 19, 2010 Thanks mate. That did the trick. Link to comment Share on other sites More sharing options...
Guest Travis Posted December 20, 2010 Report Share Posted December 20, 2010 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now