|
Virus Wanderer
Joined: 29 Jun 2002 Posts: 69 Location: USA
|
Posted: Sat Jul 27, 2002 1:25 am
Justify?? |
I was wondering if there was a command to justify text.
Richard Powell
Mux Alias: Virus
2796 Wizard Staff
64.89.10.1 port 2796
Rich@gigdev.com |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sat Jul 27, 2002 1:09 pm |
Nope, no justify.
Kjata |
|
|
|
Virus Wanderer
Joined: 29 Jun 2002 Posts: 69 Location: USA
|
Posted: Sat Jul 27, 2002 5:56 pm |
is there any way to code one? All I want to do is something so that I can even space stuff without having to each thing the same length of letters, and I cant use tabs cause it will get toooo long.
Richard Powell
Mux Alias: Virus
2796 Wizard Staff
64.89.10.1 port 2796
Rich@gigdev.com |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sat Jul 27, 2002 6:39 pm |
Oh, that's something different. For that, you can use the %format function. Example:
#SHOW %format("&5s &6s", "dog", "cat")
#SHOW %format("&5s &6s", "fish", "ant")
#SHOW %format("&5s &6s", "tiger", "monkey")
would display:
cat dog
fish ant
tiger monkey
Kjata |
|
|
|
fattony Apprentice
Joined: 27 Dec 2001 Posts: 105 Location: USA
|
Posted: Sat Jul 27, 2002 7:55 pm |
For some reason I can't get variables to work in the %format function like this.
Ex-
#show %format("&5s", @variable)
displays nothing. Any ideas?
Fat Tony |
|
|
|
fattony Apprentice
Joined: 27 Dec 2001 Posts: 105 Location: USA
|
Posted: Sat Jul 27, 2002 8:08 pm |
Figured out what the problem was. @variable is a number, and the &s is for strings only. Changing it to
#show %format("&5.0n", @variable)
fixed it.
Thanks for your time.
Fat Tony |
|
|
|
Virus Wanderer
Joined: 29 Jun 2002 Posts: 69 Location: USA
|
Posted: Sun Jul 28, 2002 5:45 am |
I actually coded one if anyone wants it. Here thet are....
#FU ljust {%1%repeat( %if( %3, %3, " "), %eval( %2-%len( %1)))}
#FU rjust {%repeat( %if( %3, %3, " "), %eval( %2-%len( %1)))%1}
#FU center {%repeat( %if( %3, %3, " "), %eval( (%2-%len( %1))/2))%1%repeat( %if( %3, %3, " "), %if( %eval( %2-%len( %1))2, %eval( ((%2-%len( %1))/2)+1), %eval( (%2-%len( %1))/2)))}
Heres one I needed for timestamps, IE if you want to know how long ago you saw something. It takes the time and converts it to seconds. I wasnt sure if there was already a code for this so I made one...
#FU secs {%eval( %time( ss)+%time( nn)*60+%time( hh)*3600)}
Good luck.
Richard Powell
Mux Alias: Virus
2796 Wizard Staff
64.89.10.1 port 2796
Rich@gigdev.com |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sun Jul 28, 2002 12:56 pm |
Actually, you can do the timestamp simpler by using %secs. This pre-defined variable contains the number of miliseconds passed since midnight. Just divide it by 1000 to get it in seconds.
Kjata |
|
|
|
|
|