<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/2587" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2002-09-15T01:53:16-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/2587</id>

		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-09-15T01:53:16-04:00</updated>

		<published>2002-09-15T01:53:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10903#p10903</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10903#p10903"/>
		<title type="html"><![CDATA[help with format]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10903#p10903"><![CDATA[
Doing it with the format command is a lot easier.<br><div class="codebox"><p>Code: </p><pre><code>set str [format "| %10s | %10s | %10s" [lindex $baa 0] [lindex $baa 1] [lindex $baa 2]]putserv "notice $nick :$str"</code></pre></div>Look up the format command in the tcl manual for more info on controlling the output, but basically for what you want, you do %XXXs, which means "a string XXX chars wide".<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sun Sep 15, 2002 1:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-09-14T18:27:43-04:00</updated>

		<published>2002-09-14T18:27:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10892#p10892</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10892#p10892"/>
		<title type="html"><![CDATA[help with format]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10892#p10892"><![CDATA[
OK - this is based on a single item, which has | at the start and end.<br><br>The list input will come from $nick, and the alignment is at 11 chars (IE, 10 chars between | and |).<br><div class="codebox"><p>Code: </p><pre><code>foreach a $nick {  puts stdout "| ${a}[string repeat " " [expr 10 - [string length $a]]]|"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Sat Sep 14, 2002 6:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[slashem]]></name></author>
		<updated>2002-09-13T18:57:17-04:00</updated>

		<published>2002-09-13T18:57:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10860#p10860</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10860#p10860"/>
		<title type="html"><![CDATA[help with format]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10860#p10860"><![CDATA[
ok, say I wanna use a fixed width of 10 chars.. <br>how do I apply that format function to it so that "bobby" becomes "bobby     "...<br>or do I have to make a procedure for usernames that adds spaces?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1742">slashem</a> — Fri Sep 13, 2002 6:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darko``]]></name></author>
		<updated>2002-09-13T18:53:48-04:00</updated>

		<published>2002-09-13T18:53:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10859#p10859</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10859#p10859"/>
		<title type="html"><![CDATA[help with format]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10859#p10859"><![CDATA[
Either use a fixed width (9 chars or whatever is your nick or handle length) of pass trough every element of the list looking for the longest. Then use that for formating length. I am not aware of any other way to do that except to script it as i said.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1881">darko``</a> — Fri Sep 13, 2002 6:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[slashem]]></name></author>
		<updated>2002-09-13T15:18:13-04:00</updated>

		<published>2002-09-13T15:18:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10855#p10855</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10855#p10855"/>
		<title type="html"><![CDATA[help with format]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10855#p10855"><![CDATA[
searched this forum and see some ppl referring to the format command, but I'm having major problems with it on using it right <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>I need to notice the users the following line several times:<br>| date | user | item<br>but user can be different each time, so the layout gets all messed up like:<br>| date | user1 | item<br>| date | user152 | item<br><br>how can I properly align it? plz <div class="codebox"><p>Code: </p><pre><code>putserv "notice $nick : | [lindex $something 0] | [lindex $something $1] | [lindex $something 2]"   </code></pre></div> <br>is what I have now..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1742">slashem</a> — Fri Sep 13, 2002 3:18 pm</p><hr />
]]></content>
	</entry>
	</feed>
