| View previous topic :: View next topic |
| Author |
Message |
SaPrOuZy Halfop

Joined: 24 Mar 2004 Posts: 75 Location: Lebanon
|
Posted: Wed Jul 18, 2007 12:06 pm Post subject: Formatted Text output |
|
|
Hi Guys,
what is the equivalent for the mIRC tab character in tcl, i tried using \t but it seem that the mirc client isn't understanding it.
Thanks |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Wed Jul 18, 2007 7:59 pm Post subject: |
|
|
The above may or may not sort something out. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Wed Jul 18, 2007 8:51 pm Post subject: Re: Formatted Text output |
|
|
| SaPrOuZy wrote: | Hi Guys,
what is the equivalent for the mIRC tab character in tcl, i tried using \t but it seem that the mirc client isn't understanding it.
Thanks |
Here you go:
| Code: |
.tcl string map {"\011" ""} "dfd sfs sdfs dfew rwe fd"
Tcl: dfdsfssdfsdfewrwefd
|
You can represent the tab character in ASCII octal format: \011
Taken from: http://www.asciitable.com/ _________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
================================== |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Thu Jul 19, 2007 5:55 am Post subject: |
|
|
\t and \011 would produce the same character, being the "normal" tab character. I do not know which character mirc might be using for tabs or spaces (been way too long since I messed with mirc).
However, if you're able to generate the character from within mirc, you could use this tiny piece of code to get the decimal value of that character (requires that you enable the .tcl-command unfortunately):
| Code: | | .tcl scan "your_char_here" "%c" |
Or this to convert it to an octal value:
| Code: | | .tcl format "%03o" [scan "your_char_here" "%c"] |
One third option (which is used with eggdrop's help-system), is to simply count the number of characters in a column, and add just the right amount of spaces to reach the next column. Abit messy, and not so pretty, but it does work. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Thu Jul 19, 2007 6:48 am Post subject: |
|
|
A fresh copy of mIRC won't truncate the tabs so \t should work properly. If you're using a custom theme or script, these usually truncate all extra spaces down to 1. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
|