<?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/15959" />

	<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>2008-07-31T18:28:43-04:00</updated>

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

		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-07-31T18:28:43-04:00</updated>

		<published>2008-07-31T18:28:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84341#p84341</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84341#p84341"/>
		<title type="html"><![CDATA[i really need ur help... tcl list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84341#p84341"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>while {[string match \{*\} $mbxmsg] &amp;&amp; [llength $mbxmsg]==1} {set list [lindex $mbxmsg 0]}return [list $mbxmsg] </code></pre></div>It appears this part uses a while (why not an if?) to check to see if there are curly braces in the string, then checks the llength against a string?! which basically returns the 1 so of course =='s it. Then it sets the lindex to 0 to remove the curly bracings? Did it assume it was a list incorrectly? But wait, lower down it returns a list of one element consisting of the contents of $mbxmsg. This is an obvious horribly written kludge to turn a string into a list.<div class="codebox"><p>Code: </p><pre><code>set a [lindex $mbxmsg 0]set b [llength $mbxmsg] </code></pre></div>Then lower down we have this code which treats it as list? then the rest of it makes no sense to me. And really none of the above does either, I can just tell why it was written. As nml375 said, to get more help you have to show more code. What is posted goes all over the place and leaves too much out.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu Jul 31, 2008 6:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-07-31T14:19:50-04:00</updated>

		<published>2008-07-31T14:19:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84325#p84325</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84325#p84325"/>
		<title type="html"><![CDATA[i really need ur help... tcl list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84325#p84325"><![CDATA[
First off, you'll have to explain what you wish to achieve...<br>Do you simply wish to dump the lists to stdout? If so, the code posted will do just that.<br>If you wish to do something more, explain it, because I have no clue what further processing you'd like to do...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Jul 31, 2008 2:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[myWorldTCL]]></name></author>
		<updated>2008-07-31T12:19:44-04:00</updated>

		<published>2008-07-31T12:19:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84317#p84317</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84317#p84317"/>
		<title type="html"><![CDATA[i still not get it]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84317#p84317"><![CDATA[
yes im using DMH Mailbox messaging...  so what shud i do to perform the code that u gave it to me juz now?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10094">myWorldTCL</a> — Thu Jul 31, 2008 12:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-07-31T11:13:17-04:00</updated>

		<published>2008-07-31T11:13:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84314#p84314</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84314#p84314"/>
		<title type="html"><![CDATA[i really need ur help... tcl list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84314#p84314"><![CDATA[
I find it very hard to figure out what the "real thing" would be. The code you posted is not only confusing, but riddled with bugs. All I've gathered is that you are trying to use "DMH Mailbox messaging"?<br><br>First off, you have a while-loop that will run as long as $a (the first list item of the recieved message) is smaller than $b, which is increased for each iteration of the loop. Hence you have a possible infinite loop.<br><br>Next, you use linsert with $a as list, and $b as index, yet you fail to supply an entity to add, causing a fatal error.<br><br>Finally, assuming those two items were fixed, you'd still end up writing the same line over and over, or possibly with added content for each iteration of the loop.<br><br><br>If you are working with a tcl-shell (tclsh or similar), use something like this to simply print the contents of the list:<div class="codebox"><p>Code: </p><pre><code>foreach sublist $mbxmsg {  puts $sublist}</code></pre></div>(With eggdrop, you'd simply replace puts with putlog to send the output to the log, or puthelp to build a command to send to the irc-server...)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Jul 31, 2008 11:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[myWorldTCL]]></name></author>
		<updated>2008-07-31T10:32:14-04:00</updated>

		<published>2008-07-31T10:32:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84312#p84312</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84312#p84312"/>
		<title type="html"><![CDATA[i still not get it]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84312#p84312"><![CDATA[
can u show me the real thing?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10094">myWorldTCL</a> — Thu Jul 31, 2008 10:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2008-07-31T10:18:17-04:00</updated>

		<published>2008-07-31T10:18:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84311#p84311</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84311#p84311"/>
		<title type="html"><![CDATA[Re: i want to display both of list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84311#p84311"><![CDATA[
Sorry for the delay... we had a power failure at work.<div class="codebox"><p>Code: </p><pre><code>foreach sublist $listOfLists {# do something to $sublist}</code></pre></div>...and you probably want to replace 'puts' with 'putlog' if you're running this script in an eggdrop.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Jul 31, 2008 10:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[myWorldTCL]]></name></author>
		<updated>2008-07-31T10:06:09-04:00</updated>

		<published>2008-07-31T10:06:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84310#p84310</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84310#p84310"/>
		<title type="html"><![CDATA[i want to display both of list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84310#p84310"><![CDATA[
regarding to my question, i want to display both of list: {{1 2 3} {4 5 6}}<br>the coding is same as above... i have post before this.. then i execute the source file... and execute both of list {{1 2 3} {4 5 6}}, but there has no result display for both of list.... <br><br><br>my question is, how to display more than one list??? let say if i execute three list like this: {{1 2 3} {4 5 6} {7 8 9}}?? maybe you can help me to correct my coding... im new of using this tcl..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10094">myWorldTCL</a> — Thu Jul 31, 2008 10:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2008-07-31T05:48:19-04:00</updated>

		<published>2008-07-31T05:48:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84309#p84309</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84309#p84309"/>
		<title type="html"><![CDATA[i really need ur help... tcl list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84309#p84309"><![CDATA[
There's no need to double-post.<br>'return' returns (the lines below are never executed) ...also, your code doesn't make much sense to me. It would be easier to help you if you explain exactly what you are trying to do.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Jul 31, 2008 5:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[myWorldTCL]]></name></author>
		<updated>2008-07-31T05:24:46-04:00</updated>

		<published>2008-07-31T05:24:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84307#p84307</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84307#p84307"/>
		<title type="html"><![CDATA[i really need ur help... tcl list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84307#p84307"><![CDATA[
i run this code in dmh console... <div class="codebox"><p>Code: </p><pre><code>while {[string match \{*\} $mbxmsg] &amp;&amp; [llength $mbxmsg]==1} {set list [lindex $mbxmsg 0]}return [list $mbxmsg]set a [lindex $mbxmsg 0]set b [llength $mbxmsg]while {$a &lt; $b} {set x [linsert $a $b]puts "[localtime 9], $x"incr b mbx whenmsg again }</code></pre></div><br>then insert the list {{1 2 3} {4 5 6}}.. there has no output display.. whats the problem???<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10094">myWorldTCL</a> — Thu Jul 31, 2008 5:24 am</p><hr />
]]></content>
	</entry>
	</feed>
