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

	<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>2003-01-20T16:34:53-04:00</updated>

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

		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2003-01-20T16:34:53-04:00</updated>

		<published>2003-01-20T16:34:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15575#p15575</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15575#p15575"/>
		<title type="html"><![CDATA[up &amp; down - green &amp; red]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15575#p15575"><![CDATA[
great - thanks so much - all working now!<br><br>thanks for your persistance!<br><br><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=2210">NewzUK</a> — Mon Jan 20, 2003 4:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-01-20T12:43:51-04:00</updated>

		<published>2003-01-20T12:43:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15565#p15565</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15565#p15565"/>
		<title type="html"><![CDATA[up &amp; down - green &amp; red]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15565#p15565"><![CDATA[
<blockquote class="uncited"><div>this will just work if there is an actual + or - infront of the number...</div></blockquote>^^.... and did you change the output?<br><div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG $channel :\0037» [lindex $all 0]:\003 [lindex $all 2] \002$test\003\002 ([lindex $all 4]) \0037 Time:\003 [lindex $all 1] USET \0037 Low-High:\003 [lindex $all 5] \0037 Volume:\003 [lindex $all 6]"</code></pre></div>if there is no + or - infront of the number you have to do something like this instead:<br><div class="codebox"><p>Code: </p><pre><code>if {[lindex $all 3] &gt; 0} { set test "\0039 [lindex $all 3]"} elseif {[lindex $all 3] &lt; 0} { set test "\0034 [lindex $all 3]"} else { set test "\00312 [lindex $all 3]" }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Mon Jan 20, 2003 12:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2003-01-19T21:01:33-04:00</updated>

		<published>2003-01-19T21:01:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15545#p15545</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15545#p15545"/>
		<title type="html"><![CDATA[up &amp; down - green &amp; red]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15545#p15545"><![CDATA[
still dosn't work - puts the quote in ok but dosn't change the color<br><br>*sigh*<br><br>oh well<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Sun Jan 19, 2003 9:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-01-19T20:40:26-04:00</updated>

		<published>2003-01-19T20:40:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15543#p15543</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15543#p15543"/>
		<title type="html"><![CDATA[up &amp; down - green &amp; red]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15543#p15543"><![CDATA[
ummm my fult ... didn't check the code  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> <br>ah well <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">... change this line<div class="codebox"><p>Code: </p><pre><code>set test [string map [list + \00309+ - \00304-] </code></pre></div>with this<div class="codebox"><p>Code: </p><pre><code>set test [string map [list + \00309+ - \00304-] [lindex $all 3]]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Sun Jan 19, 2003 8:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2003-01-19T18:47:16-04:00</updated>

		<published>2003-01-19T18:47:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15532#p15532</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15532#p15532"/>
		<title type="html"><![CDATA[up &amp; down - green &amp; red]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15532#p15532"><![CDATA[
that dosn't work - bot sends nothing to the channel - not even the normal quote.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Sun Jan 19, 2003 6:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-01-19T08:31:08-04:00</updated>

		<published>2003-01-19T08:31:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15521#p15521</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15521#p15521"/>
		<title type="html"><![CDATA[up &amp; down - green &amp; red]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15521#p15521"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc pub:quote { nick uhost handle channel arg } { set [lindex [info args pub:quote] 4] [string trimleft [subst $[lindex [info args pub:quote] 4]] !] foreach _IG [uplevel #0 {set IGwords}] { if {[string equal -nocase $_IG [lindex [split $arg] 0]]} { return } } if {[llength $arg]==0} { putserv "NOTICE $nick :0,2 please type \002!news\002 for options " } else { set stock [string toupper [lindex $arg 0]] set query "http://finance.yahoo.com/d/quotes.csv?s=$stock&amp;f=st5l9c6p4mv&amp;e=.csv" set token [http::geturl $query] set all [http::data $token] regsub -all \" $all "" all set all [split $all ","]set test [string map [list + \00309+ - \00304-]if {[lindex $all 2]!="0.00"} { putserv "PRIVMSG $channel :\0037» [lindex $all 0]:\003 [lindex $all 2] \002$test\003\002 ([lindex $all 4]) \0037 Time:\003 [lindex $all 1] USET \0037 Low-High:\003 [lindex $all 5] \0037 Volume:\003 [lindex $all 6]" } else { putserv "PRIVMSG $channel :\002 [lindex $all 0]\002 symbol not found"</code></pre></div>this will just work if there is an actual + or - infront of the number...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Sun Jan 19, 2003 8:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2003-01-19T05:00:05-04:00</updated>

		<published>2003-01-19T05:00:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15517#p15517</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15517#p15517"/>
		<title type="html"><![CDATA[up &amp; down - green &amp; red]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15517#p15517"><![CDATA[
the things ive tried so far havn't worked properly <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> if anyone could possibly show me what to put in the script to make this work - thanks!<br><br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Sun Jan 19, 2003 5:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2003-01-17T20:41:16-04:00</updated>

		<published>2003-01-17T20:41:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15482#p15482</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15482#p15482"/>
		<title type="html"><![CDATA[up &amp; down - green &amp; red]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15482#p15482"><![CDATA[
...thanks...will try to figure it out from other bits of the script  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Fri Jan 17, 2003 8:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-01-17T20:21:30-04:00</updated>

		<published>2003-01-17T20:21:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15480#p15480</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15480#p15480"/>
		<title type="html"><![CDATA[up &amp; down - green &amp; red]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15480#p15480"><![CDATA[
you have to make a variable out of [lindex $all 3], then check if that var is + , - or 0, when you've done the cheking just append whatever color you want<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Fri Jan 17, 2003 8:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2003-01-17T06:15:55-04:00</updated>

		<published>2003-01-17T06:15:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15457#p15457</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15457#p15457"/>
		<title type="html"><![CDATA[up &amp; down - green &amp; red]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15457#p15457"><![CDATA[
yep thanks - I know the numbers, just need to know where &amp; what to insert <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>the value that goes + and - is [lindex $all 3] so I guess thats in the string somewhere...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Fri Jan 17, 2003 6:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-01-17T01:59:08-04:00</updated>

		<published>2003-01-17T01:59:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15442#p15442</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15442#p15442"/>
		<title type="html"><![CDATA[up &amp; down - green &amp; red]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15442#p15442"><![CDATA[
\003color number. As I can see blue is 12 and 2 is navy <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=187">caesar</a> — Fri Jan 17, 2003 1:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2003-01-16T19:49:21-04:00</updated>

		<published>2003-01-16T19:49:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15438#p15438</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15438#p15438"/>
		<title type="html"><![CDATA[up &amp; down - green &amp; red]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15438#p15438"><![CDATA[
thanks - so would I just insert that somewhere in the proc?<br><br>proc pub:quote { nick uhost handle channel arg } {<br>set [lindex [info args pub:quote] 4] [string trimleft [subst $[lindex [info args pub:quote] 4]] !]<br>foreach _IG [uplevel #0 {set IGwords}] { if {[string equal -nocase $_IG [lindex [split $arg] 0]]} { return } }<br>if {[llength $arg]==0} {<br>putserv "NOTICE $nick :0,2 please type \002!news\002 for options "<br>} else {<br>        set stock [string toupper [lindex $arg 0]]<br>set query "<a href="http://finance.yahoo.com/d/quotes.csv?s=$stock&amp;f=st5l9c6p4mv&amp;e=.csv" class="postlink">http://finance.yahoo.com/d/quotes.csv?s ... 4mv&amp;e=.csv</a>"<br>set token [http::geturl $query]<br>set all [http::data $token]<br>regsub -all \" $all "" all<br>set all [split $all ","]<br>if {[lindex $all 2]!="0.00"} {<br>putserv "PRIVMSG $channel :\0037» [lindex $all 0]:\003 [lindex $all 2] \002[lindex $all 3]\002 ([lindex $all 4]) \0037 Time:\003 [lindex $all 1] USET \0037 Low-High:\003 [lindex $all 5] \0037 Volume:\003 [lindex $all 6]"<br>} else {<br>putserv "PRIVMSG $channel :\002 [lindex $all 0]\002 symbol not found"<br><br>also, if it's a 0 number (unchanged) and I want to make that blue, would I just add another one for \0032 ?<br><br>thanks again!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Thu Jan 16, 2003 7:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-16T19:38:01-04:00</updated>

		<published>2003-01-16T19:38:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15435#p15435</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15435#p15435"/>
		<title type="html"><![CDATA[up &amp; down - green &amp; red]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15435#p15435"><![CDATA[
It's very simple to determine between a + or -, so therw would be no issue converting it.<br><div class="codebox"><p>Code: </p><pre><code>set test [string map [list + \00309 - \00304]</code></pre></div>That will amp the up and down to red and green.<br><br>My gueess is though you want more information than this?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Jan 16, 2003 7:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[NewzUK]]></name></author>
		<updated>2003-01-16T17:47:25-04:00</updated>

		<published>2003-01-16T17:47:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15434#p15434</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15434#p15434"/>
		<title type="html"><![CDATA[up &amp; down - green &amp; red]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15434#p15434"><![CDATA[
Hi<br><br>After previous help on this forum (for which Im very gratefull!), here's another question!<br><br>I use a stockquote script for my business channel, and I'm wondering how to go about adding some code that will make the quotes display green if it returns a + (up) amount and red if it returns a - (down) amount...<br><br>I have a mIRC script which does this, but I'm just wondering how it might work for TCL...<br><br>let me know if I should post a piece of the script here...<br><br>thanks in advance!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2210">NewzUK</a> — Thu Jan 16, 2003 5:47 pm</p><hr />
]]></content>
	</entry>
	</feed>
