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

	<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-04T17:08:28-04:00</updated>

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

		<entry>
		<author><name><![CDATA[game_over]]></name></author>
		<updated>2008-11-04T17:08:28-04:00</updated>

		<published>2008-11-04T17:08:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85724#p85724</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85724#p85724"/>
		<title type="html"><![CDATA[regexp?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85724#p85724"><![CDATA[
you have to know where is the word <br><br>example: <br><br>word word word word <br>word word word word<br><strong class="text-strong">word1</strong> word word word<br><br>i search where in my file i have <strong class="text-strong">word1</strong><div class="codebox"><p>Code: </p><pre><code>set hcs [open $file r]; set scorefile [split [read $hcs] "\n"]; close $hcs    foreach newscore $scorefile {       if {[lindex $newscore 0] == "word1"} {     set scoreall $newscore; # scoreall is my total line :)   }} unset scorefile putlog "total: [lindex $scoreall 1] [lindex $scoreall 2]"</code></pre></div>if i whant to sum all resalts and write total under all scores<div class="codebox"><p>Code: </p><pre><code>set scoreall1 0; scoreall2 0set hcs [open $file r]; set scorefile [split [read $hcs] "\n"]; close $hcs    foreach newscore $scorefile {       if {[lindex $newscore 0] != "totaljoueur" || [lindex $newscore 0] != ""} {     set scoreall1 [expr [lindex $newscore 1] + $scoreall1]                             set scoreall2 [expr [lindex $newscore 2] + $scoreall2]   }}    set writedata [open $file w]       foreach newdata $scorefile {      if {[lindex $newdata 0] != "totaljoueur"} {            puts $writedata "$newdata"         } elseif {[lindex $newdata 0] != ""} {            puts $writedata "totaljoueur $scoreall1 $scoreall2"         }}  flush $writedata; close $writedata; unset scorefile</code></pre></div>when script resum all set new total line under and remove old<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8946">game_over</a> — Tue Nov 04, 2008 5:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[romain]]></name></author>
		<updated>2008-11-03T19:15:54-04:00</updated>

		<published>2008-11-03T19:15:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85716#p85716</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85716#p85716"/>
		<title type="html"><![CDATA[regexp?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85716#p85716"><![CDATA[
Hello,<br><br>In the file with more lines <br><blockquote class="uncited"><div>......<br>[00:17] &lt;test&gt;  [05joueur1] :: [game1] [point]<br>[00:17] &lt;test&gt;  [03Joueur2] :: [game2] [point]<br>[00:18] &lt;test&gt;  |[06totaljoueur] :: [totalgame] [totalpoint]<br>.....</div></blockquote>How to write only the line with "totaljoueur" for have this result<br><br> <blockquote class="uncited"><div>|[06totaljoueur] :: [totalgame] [totalpoint]</div></blockquote>thx for help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6856">romain</a> — Mon Nov 03, 2008 7:15 pm</p><hr />
]]></content>
	</entry>
	</feed>
