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

	<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>2004-01-28T16:21:29-04:00</updated>

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

		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-01-28T16:21:29-04:00</updated>

		<published>2004-01-28T16:21:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33042#p33042</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33042#p33042"/>
		<title type="html"><![CDATA[foreach usage question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33042#p33042"><![CDATA[
You might want to check <a href="http://forum.egghelp.org/viewtopic.php?t=6690#33031" class="postlink">this</a> post. It's a word wrapping proc that splits the entire string and loops through the words. It doesn't split words that are too long to fit on a single line, though. But if you can live with that it should be just what you need. (I didn't do any speed tests to compare it to other methods of splitting because I'm too lazy right now, but it can't be that bad...it's fairly compact)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Jan 28, 2004 4:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-01-25T20:27:19-04:00</updated>

		<published>2004-01-25T20:27:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32880#p32880</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32880#p32880"/>
		<title type="html"><![CDATA[foreach usage question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32880#p32880"><![CDATA[
i certainly will tnx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun Jan 25, 2004 8:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-01-25T16:47:50-04:00</updated>

		<published>2004-01-25T16:47:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32868#p32868</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32868#p32868"/>
		<title type="html"><![CDATA[foreach usage question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32868#p32868"><![CDATA[
Check out <a href="http://tcl.tk/man/tcl8.4/TclCmd/string.htm#M32" class="postlink">string last</a> (or first - depending on what you want) or <a href="http://tcl.tk/man/tcl8.4/TclCmd/string.htm#M50" class="postlink">string wordstart</a> (or wordend). You should be able to make a word wrapping proc with one/more of these commands.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Sun Jan 25, 2004 4:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-01-25T13:06:09-04:00</updated>

		<published>2004-01-25T13:06:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32862#p32862</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32862#p32862"/>
		<title type="html"><![CDATA[foreach usage question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32862#p32862"><![CDATA[
ok got it used textutils (tcllib) to do so but if someone knows how to do it with out this plz post <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"> tnx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun Jan 25, 2004 1:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-01-25T01:11:51-04:00</updated>

		<published>2004-01-25T01:11:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32850#p32850</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32850#p32850"/>
		<title type="html"><![CDATA[foreach usage question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32850#p32850"><![CDATA[
yes and no looks like it but not exactly would be same as <br><blockquote class="uncited"><div>[lrange [split $arg {}] 0 100]</div></blockquote>i got a description of somethig in db and that description is one line but some descriptions have byte count of 500 - 1000<br><br>and others have bytecounts of 1 - 20<br><br>in those descriptions are words with byte count 1 - 60 and i just wana output a deasend text but if you use the format thing then its like some workds are pressed to eachother sometimes don't even see the space and some are spread out that you have to go look for the second word .. so i want to a make a loop that splits the word on the first space after byte count 100 ..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun Jan 25, 2004 1:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-01-25T00:39:43-04:00</updated>

		<published>2004-01-25T00:39:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32849#p32849</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32849#p32849"/>
		<title type="html"><![CDATA[foreach usage question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32849#p32849"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>proc bytesplit {nick uhost hand chan arg} {  foreach line [split {[string bytelength $arg] &gt; 100 &amp;&amp; [string bytelength $arg]} &lt; 120 \x20] {      putserv "privmsg $chan :$line"  }}</code></pre></div>more something like that but this doesn't work have to find the right syntax and way to put it ..</div></blockquote>Are you trying to truncate your strings if they are too large? If this is the case, you should be using string range obviously.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Jan 25, 2004 12:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-01-25T00:33:07-04:00</updated>

		<published>2004-01-25T00:33:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32847#p32847</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32847#p32847"/>
		<title type="html"><![CDATA[foreach usage question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32847#p32847"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc bytesplit {nick uhost hand chan arg} {  foreach line [split {[string bytelength $arg] &gt; 100 &amp;&amp; [string bytelength $arg]} &lt; 120 \x20] {      putserv "privmsg $chan :$line"  }}</code></pre></div>more something like that but this doesn't work have to find the right syntax and way to put it ..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun Jan 25, 2004 12:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-01-25T00:30:44-04:00</updated>

		<published>2004-01-25T00:30:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32846#p32846</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32846#p32846"/>
		<title type="html"><![CDATA[foreach usage question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32846#p32846"><![CDATA[
i do understand what it is and what it does its <br><br>%s $a thats what your doing in a way your makeing colums<br><br>then you add<br><br>% -20%s like the with of the colum becomes 20 .. but its not exactly what i am looking for realy sorry if i am making you feel unconfortable .. don't mean to .. realy realy sorry hehe could be wrong but i think that is what you do<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun Jan 25, 2004 12:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-01-25T00:13:18-04:00</updated>

		<published>2004-01-25T00:13:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32845#p32845</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32845#p32845"/>
		<title type="html"><![CDATA[foreach usage question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32845#p32845"><![CDATA[
Omg, I hate spoon feeding like this, but I guess I'm going to have to...<br><br>You have a general idea how long your longest string is, let's say its 20 characters in length... so we use format to padd each string with (20-length of string) [twenty minus length of string] spaces, by using the formatting option %-20s .... This way, all strings are columnized underneath eachother in a proper fashion.....<br><div class="codebox"><p>Code: </p><pre><code>set outfile [open "yourfile" w]foreach {a b c d e} $yourlist {  puts $outfile "[format %-20s%-20s%-20s%-20s%s $a $b $c $d $e]"}close $outfile</code></pre></div>Other than this, I have no idea on how to make you comprehend.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Jan 25, 2004 12:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-01-25T00:08:49-04:00</updated>

		<published>2004-01-25T00:08:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32844#p32844</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32844#p32844"/>
		<title type="html"><![CDATA[foreach usage question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32844#p32844"><![CDATA[
Sorry didn't mean to trouble u about it just want to have nice text format how its done who cares result counts but by spreading it out isn't realy working for me cause some strings contain realy big words and verry small ones so doesn't have a nice out put .. as i sad before its not realy what i am looking for but tnx for the help <br><br>.. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> sorry ..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun Jan 25, 2004 12:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-01-25T00:04:20-04:00</updated>

		<published>2004-01-25T00:04:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32843#p32843</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32843#p32843"/>
		<title type="html"><![CDATA[foreach usage question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32843#p32843"><![CDATA[
Make up your mind, you either want to spread the data out evenly, or you don't.... If you do, use format, if you don't, don't use format. Simple as that...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Jan 25, 2004 12:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-01-25T00:02:11-04:00</updated>

		<published>2004-01-25T00:02:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32842#p32842</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32842#p32842"/>
		<title type="html"><![CDATA[foreach usage question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32842#p32842"><![CDATA[
yes but its not exacty what i wanted to do isn't there a way to do byte count and split the space on a certain byte ?? so it doesn't spread out looks mutch nicer just don't have a clue how to begin on that ..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun Jan 25, 2004 12:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-01-24T23:57:51-04:00</updated>

		<published>2004-01-24T23:57:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32841#p32841</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32841#p32841"/>
		<title type="html"><![CDATA[foreach usage question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32841#p32841"><![CDATA[
Again, the spaces are there in the file if you format the text exactly how I showed you for the putlog formatting.... Why is this so hard for you to grasp?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sat Jan 24, 2004 11:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-01-24T23:56:12-04:00</updated>

		<published>2004-01-24T23:56:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32840#p32840</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32840#p32840"/>
		<title type="html"><![CDATA[foreach usage question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32840#p32840"><![CDATA[
hmm i know but in the channel it adds spaces to spread it out .. but in txt those spaces are not there so ..<br><br>in channel <br><blockquote class="uncited"><div>text_______text__textextextext<br>text________text_______________text</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sat Jan 24, 2004 11:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-01-24T23:52:43-04:00</updated>

		<published>2004-01-24T23:52:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=32839#p32839</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=32839#p32839"/>
		<title type="html"><![CDATA[foreach usage question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=32839#p32839"><![CDATA[
You write to file formatted exactly like you write it to channel formatted.  It isn't rocket science.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sat Jan 24, 2004 11:52 pm</p><hr />
]]></content>
	</entry>
	</feed>
