egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Formatted Text output

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
SaPrOuZy
Halfop


Joined: 24 Mar 2004
Posts: 75
Location: Lebanon

PostPosted: Wed Jul 18, 2007 12:06 pm    Post subject: Formatted Text output Reply with quote

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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Wed Jul 18, 2007 7:59 pm    Post subject: Reply with quote

Code:
.fixcodes

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
View user's profile Send private message Visit poster's website
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Wed Jul 18, 2007 8:51 pm    Post subject: Re: Formatted Text output Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Jul 19, 2007 5:55 am    Post subject: Reply with quote

\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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Jul 19, 2007 6:48 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber