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

	<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>2005-07-26T06:05:51-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-07-26T06:05:51-04:00</updated>

		<published>2005-07-26T06:05:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53309#p53309</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53309#p53309"/>
		<title type="html"><![CDATA[string help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53309#p53309"><![CDATA[
And to output these elements use:<div class="codebox"><p>Code: </p><pre><code>foreach e [array names element] { puthelp "PRIVMSG $chan :$element($e)"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Jul 26, 2005 6:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-07-26T05:53:39-04:00</updated>

		<published>2005-07-26T05:53:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53306#p53306</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53306#p53306"/>
		<title type="html"><![CDATA[Re: string help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53306#p53306"><![CDATA[
<blockquote class="uncited"><div>if i said ".hello my name is loser" in the main?<br>how can i get "my" &amp; "name" &amp; "is" &amp; "loser" in different vars?</div></blockquote>This should give you and idea:<div class="codebox"><p>Code: </p><pre><code>set string "my name is loser"for {set i 0} {$i&lt;[llength [split $string]]} {incr i} { set element($i) [lindex [split $string] $i]}</code></pre></div>Now you'll have:<blockquote class="uncited"><div>$element(0) = my<br>$element(1) = name<br>$element(2) = is<br>$element(3) = loser</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Tue Jul 26, 2005 5:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tuete]]></name></author>
		<updated>2005-07-26T03:31:09-04:00</updated>

		<published>2005-07-26T03:31:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53301#p53301</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53301#p53301"/>
		<title type="html"><![CDATA[string help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53301#p53301"><![CDATA[
the easiest way is to split your string into a list, then you can access the single list elements.<br><div class="codebox"><p>Code: </p><pre><code>set mystring "hello my name is loser"set list [split $mystring " "]set element [lrange $list 0 0]</code></pre></div>in this example the var element would contain "hello". try to experiment with the numbers, they tell lrange wich element of the list to take.<br><br>greetings<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6523">tuete</a> — Tue Jul 26, 2005 3:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[loser]]></name></author>
		<updated>2005-07-26T03:15:05-04:00</updated>

		<published>2005-07-26T03:15:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53300#p53300</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53300#p53300"/>
		<title type="html"><![CDATA[string help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53300#p53300"><![CDATA[
if i said ".hello my name is loser" in the main?<br>how can i get "my" &amp; "name" &amp; "is" &amp; "loser" in different vars?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6463">loser</a> — Tue Jul 26, 2005 3:15 am</p><hr />
]]></content>
	</entry>
	</feed>
