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

	<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>2006-07-20T01:18:53-04:00</updated>

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

		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2006-07-20T01:18:53-04:00</updated>

		<published>2006-07-20T01:18:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64732#p64732</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64732#p64732"/>
		<title type="html"><![CDATA[two problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64732#p64732"><![CDATA[
don't forget to close the file.<br><div class="codebox"><p>Code: </p><pre><code>set openfile [open "path/to/your/file" r]set data [read $openfile]close $openfileforeach line [split $data \n] {  if {$line == nick1} {    #perform whatever commands  } elseif {$line == nick2} {    #perform other commands  } else {    #another set of commands  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Thu Jul 20, 2006 1:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[krimson]]></name></author>
		<updated>2006-07-19T11:21:57-04:00</updated>

		<published>2006-07-19T11:21:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64714#p64714</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64714#p64714"/>
		<title type="html"><![CDATA[two problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64714#p64714"><![CDATA[
you can use something like this<div class="codebox"><p>Code: </p><pre><code>set openfile [open "path/to/your/file" r]set data [read $openfile]foreach line [split $data \n] {  if {$line == nick1} {     #perform whatever commands  } elseif {$line == nick2} {    #perform other commands  } else {    #another set of commands  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7663">krimson</a> — Wed Jul 19, 2006 11:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[keeper2]]></name></author>
		<updated>2006-07-19T10:35:25-04:00</updated>

		<published>2006-07-19T10:35:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64713#p64713</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64713#p64713"/>
		<title type="html"><![CDATA[two problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64713#p64713"><![CDATA[
<blockquote class="uncited"><div>1. use [split "This-is-a-test" -]<br>2. <a href="http://tclhelp.net/#faqfile" class="postlink">http://tclhelp.net/#faqfile</a></div></blockquote>Thanks, but when I have the whole Textfile in data how to search for a specified string?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7984">keeper2</a> — Wed Jul 19, 2006 10:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[krimson]]></name></author>
		<updated>2006-07-19T10:30:50-04:00</updated>

		<published>2006-07-19T10:30:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64712#p64712</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64712#p64712"/>
		<title type="html"><![CDATA[two problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64712#p64712"><![CDATA[
1. use [split "This-is-a-test" -]<br>2. <a href="http://tclhelp.net/#faqfile" class="postlink">http://tclhelp.net/#faqfile</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7663">krimson</a> — Wed Jul 19, 2006 10:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[keeper2]]></name></author>
		<updated>2006-07-19T10:25:59-04:00</updated>

		<published>2006-07-19T10:25:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=64711#p64711</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=64711#p64711"/>
		<title type="html"><![CDATA[two problems]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=64711#p64711"><![CDATA[
OK I am new to TCL scripting, I come from the mirc scripting camp <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">.<br><br>I already read some articles about scripting in TCL, but don't find a answer to these two questions.<br><br><strong class="text-strong">1.</strong> Is there a command like gettok in TCL so you can cut a string lets say:<br>This-is-a-test<br><br>into<br><br>This<br>is<br>a<br>test<br><br>and access all of these strings seperatly<br><br><strong class="text-strong">2.</strong> I have a Textfile in which in each line a nickname is. Now I want to search the Textfile for a nick and if it is found that the TCL script do sth.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7984">keeper2</a> — Wed Jul 19, 2006 10:25 am</p><hr />
]]></content>
	</entry>
	</feed>
