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

	<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>2001-10-10T15:23:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2001-10-10T15:23:00-04:00</updated>

		<published>2001-10-10T15:23:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=455#p455</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=455#p455"/>
		<title type="html"><![CDATA[treating variables in strings as text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=455#p455"><![CDATA[
Well I guess it's too late, now, but if you were still wondering how to do it your original way, try this:<br><br>set mystring {hello $dynamic eat more eggdrop soup}<br><br>proc output_something {some_arg somechan} {<br>  global mystring<br>  set dynamic $some_arg<br>  set newstring [subst $mystring]<br>  putserv "$somechan :$newstring"<br>}<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Wed Oct 10, 2001 3:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-10-10T12:47:00-04:00</updated>

		<published>2001-10-10T12:47:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=452#p452</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=452#p452"/>
		<title type="html"><![CDATA[treating variables in strings as text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=452#p452"><![CDATA[
Oh nevermind..<br><br>I solved the problem using regsub inside the proc... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by Guest — Wed Oct 10, 2001 12:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-10-10T12:25:00-04:00</updated>

		<published>2001-10-10T12:25:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=450#p450</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=450#p450"/>
		<title type="html"><![CDATA[treating variables in strings as text]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=450#p450"><![CDATA[
To simplify the use of the script im writing, i want the user to be able to have total control over the output. To make this possible i want the user to able to define how the output should look using a global variable and then simply put some kind of marker (or variable) in the output string where the dynamic data will be put.<br><br>An example:<br><br># In this string $dynamic could be placed wherever the user wants, and the rest could be whatever text the user want<br>set mystring "hello $dynamic eat more eggdrop soup"<br><br>proc output_something {some_arg somechan} {<br>  global mystring<br>  set dynamic $some_arg<br>  putserv "$somechan :$mystring"<br>} <br><br>You see the problem. This will of course make the bot to puke. So if i could prevent $dynamic from being evaluated the first time it will work fine.<br><br>Im just not sure if its doable. If it is, the solution eludes me.<br>So can it be done? If not, can someone think of another way to achieve the result i want?<br><br>Someone must have spent some mindwork on this kind of problem before...<br><p>Statistics: Posted by Guest — Wed Oct 10, 2001 12:25 pm</p><hr />
]]></content>
	</entry>
	</feed>
