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

	<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-11-20T08:22:28-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ultralord]]></name></author>
		<updated>2008-11-20T08:22:28-04:00</updated>

		<published>2008-11-20T08:22:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85890#p85890</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85890#p85890"/>
		<title type="html"><![CDATA[id number per file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85890#p85890"><![CDATA[
good try  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> also if you can make another proc and you can put one number like 1 1 1 1 and when you rehash the bot the variable read how many times you have the number 1 1 1 1 into a txt file and then you have your latest id number .  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_idea.gif" width="15" height="15" alt=":idea:" title="Idea"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8360">ultralord</a> — Thu Nov 20, 2008 8:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[game_over]]></name></author>
		<updated>2008-11-11T12:18:40-04:00</updated>

		<published>2008-11-11T12:18:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85770#p85770</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85770#p85770"/>
		<title type="html"><![CDATA[id number per file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85770#p85770"><![CDATA[
I know another way <div class="codebox"><p>Code: </p><pre><code>set directory "txts/"#only txt files :)set pattern "*.txt"if {[catch {glob "${directory}${pattern}"} files]} {return "No files in this dir"} else { if {[string match "*[info script]*" $files]} {set listOffilesInThistDir [expr [llength $files] -1]}   }</code></pre></div>now when you know filecount you script newfile to $listOffilesInThistDir + 1 <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8946">game_over</a> — Tue Nov 11, 2008 12:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-11-11T11:17:21-04:00</updated>

		<published>2008-11-11T11:17:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85769#p85769</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85769#p85769"/>
		<title type="html"><![CDATA[id number per file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85769#p85769"><![CDATA[
Ohh, you meant restore..<br>Well, one way would be to include code to (re)write a simple tcl-script (loaded from your script once it completes) which basically sets the variable to the previous value...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Tue Nov 11, 2008 11:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ultralord]]></name></author>
		<updated>2008-11-11T05:03:28-04:00</updated>

		<published>2008-11-11T05:03:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85767#p85767</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85767#p85767"/>
		<title type="html"><![CDATA[id number per file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85767#p85767"><![CDATA[
if i rehash or restart the bot the counter number will be 0 and then will be start count again from begging ..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8360">ultralord</a> — Tue Nov 11, 2008 5:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-11-10T20:55:32-04:00</updated>

		<published>2008-11-10T20:55:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85762#p85762</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85762#p85762"/>
		<title type="html"><![CDATA[id number per file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85762#p85762"><![CDATA[
Resolve? Could you please elaborate that a bit?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Mon Nov 10, 2008 8:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ultralord]]></name></author>
		<updated>2008-11-09T21:17:52-04:00</updated>

		<published>2008-11-09T21:17:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85754#p85754</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85754#p85754"/>
		<title type="html"><![CDATA[id number per file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85754#p85754"><![CDATA[
thnx <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised"> i found another way yo do my job <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>i make some procs more and i make same expr and done..<br><br>thanks that will be very usefull in the future<br><br>also. how i can resolve the id when i rehash my bot if i use it?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8360">ultralord</a> — Sun Nov 09, 2008 9:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-11-09T20:57:49-04:00</updated>

		<published>2008-11-09T20:57:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85753#p85753</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85753#p85753"/>
		<title type="html"><![CDATA[id number per file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85753#p85753"><![CDATA[
I'd suggest you store a counter in some global variable, say <em class="text-italics">file_counter</em>, and use something like this:<div class="codebox"><p>Code: </p><pre><code>#instantiate the file_counter variable upon loadset file_counter 0...proc yourproc .... set fileio [open "/home/ultralord/www/g_last2[format "%02u" [incr ::file_counter]]" "w"]...</code></pre></div>Here we use <strong class="text-strong">incr</strong> to increase the value of the counter upon every iteration of the code, and then <strong class="text-strong">format</strong> to achieve the desired 2-digit format with padding zeros.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Nov 09, 2008 8:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ultralord]]></name></author>
		<updated>2008-11-09T20:01:17-04:00</updated>

		<published>2008-11-09T20:01:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85752#p85752</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85752#p85752"/>
		<title type="html"><![CDATA[id number per file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85752#p85752"><![CDATA[
hello i have one proc that:<br><br><br>set g_last2 [linsert $g_last2 end $g_lastinfo]<br>      set fileio [open /home/ultralord/www/g_last2.txt "w"]<br>      puts $fileio $g_last2<br>      flush $fileio<br>      close $fileio<br><br><br>that creates one txt file with name g_last2 .. i want w8 that proc run's second time then i want to create txt file with name g_last201 .. is it possible?<br><br>01=id number and after that 02.. etc..<br><br><br>thnx in advance<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8360">ultralord</a> — Sun Nov 09, 2008 8:01 pm</p><hr />
]]></content>
	</entry>
	</feed>
