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

	<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>2002-03-18T21:30:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-03-18T21:30:00-04:00</updated>

		<published>2002-03-18T21:30:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5519#p5519</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5519#p5519"/>
		<title type="html"><![CDATA[Pausing for user input?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5519#p5519"><![CDATA[
perfect <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":grin:" title="Very Happy"><br><br>thanks for all the help, egghead!<br><br>first time I'm attempting a script of this nature - would like to get away from the standard public triggers and bot msgs/ctcps <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><br><br><p>Statistics: Posted by Guest — Mon Mar 18, 2002 9:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2002-03-18T19:26:00-04:00</updated>

		<published>2002-03-18T19:26:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5512#p5512</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5512#p5512"/>
		<title type="html"><![CDATA[Pausing for user input?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5512#p5512"><![CDATA[
<blockquote class="uncited"><div>On 2002-03-18 12:33, jestrix wrote:<br>OK, so here's the layout.  Someone tell me if I'm on the right track <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><div class="codebox"><p>Code: </p><pre><code>#binding for initiating menu systembind pub o|-  !menu startmenu#start menu procedureproc startmenu {nick uhost hand chan args} {  #get the hostname part of uhost   set uhostname [lindex [split $uhost @] 1]    #connect to the user (port 45123 is random) and return the user's idx   set idx [connect $uhostname 45123]    #pass off chat to control function   control $idx menusystem $args  #all done   exit   } #end startmenu</code></pre></div>in the above, does it matter what port I have the connect set to?  I just picked a random high # port....<br></div></blockquote>You are not completely on the right track.<br>1. trying to [connect] to the machine of the user doing !menu on port 45123 doesn't make much sense. What does your firewall do when there is a connection attempt on port 45123 on your machine. [connect] to a port does make sense if you are sure there is a service listening on that port e.g. port 80 of <a href="http://www.egghelp.org" class="postlink">http://www.egghelp.org</a> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"><br>2. handing over [control] is with two arguments: the connection idx and the procedure name you hand the control over to.<br>Eggdrop will then know to what procedure to send data to, when data is coming through the connection idx. The nice part is that you can continue to handover [control] from one procedure to the other.<br><blockquote class="uncited"><div>Now, all input should be passed to my startmenu procedure, correct?  Hopefully I've got that much correct <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><br><br>ok - now in this procedure... blabla...<br><br>[snip]<br><br>hopefully I'm explaining myself clearly....<br></div></blockquote>Actually, that wasn't to clear to me... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"> maybe the below example will help you further...<br><blockquote class="uncited"><div>and if anyone knows of a script that uses a dcc menu system, i would love to look at it!!</div></blockquote>Well, I've made a small example which you can test, play with and modify...<br><br><a href="http://www.geocities.com/eggheadtcl/menu.tcl.txt" class="postlink">http://www.geocities.com/eggheadtcl/menu.tcl.txt</a><br><br>&lt;font size=-1&gt;[ This Message was edited by: egghead on 2002-03-18 16:31 ]&lt;/font&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Mon Mar 18, 2002 7:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-03-18T15:33:00-04:00</updated>

		<published>2002-03-18T15:33:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5503#p5503</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5503#p5503"/>
		<title type="html"><![CDATA[Pausing for user input?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5503#p5503"><![CDATA[
OK, so here's the layout.  Someone tell me if I'm on the right track <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><div class="codebox"><p>Code: </p><pre><code>#binding for initiating menu systembind pub o|-  !menu startmenu#start menu procedureproc startmenu {nick uhost hand chan args} {  #get the hostname part of uhost   set uhostname [lindex [split $uhost @] 1]    #connect to the user (port 45123 is random) and return the user's idx   set idx [connect $uhostname 45123]    #pass off chat to control function   control $idx menusystem $args  #all done   exit   } #end startmenu</code></pre></div>in the above, does it matter what port I have the connect set to?  I just picked a random high # port....<br><br>Now, all input should be passed to my startmenu procedure, correct?  Hopefully I've got that much correct <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><br><br>ok - now in this procedure, if any input text gets sent to the script, that means I can't have the first menu be something like:<br><br>1. Type 1<br>2. Type 2<br><br>and if they type "1" they get:<br><br>1. Type 1<br>2  Type 2<br><br>since there are two possible times for them to type "1" or "2". basically, is there any way to pause the script in the middle of a procedure, wait for input, call that input some variable, then continue the procedure based on the content of that var?<br><br>hopefully I'm explaining myself clearly....  and if anyone knows of a script that uses a dcc menu system, i would love to look at it!!<p>Statistics: Posted by Guest — Mon Mar 18, 2002 3:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-03-18T09:47:00-04:00</updated>

		<published>2002-03-18T09:47:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5493#p5493</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5493#p5493"/>
		<title type="html"><![CDATA[Pausing for user input?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5493#p5493"><![CDATA[
The pause happens automatically. Your control procedure is called only when they type something in. So it'll just sit there, and then they type "3" or whatever, and eggdrop calls your control procedure with "3" as the text argument.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Mon Mar 18, 2002 9:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-03-18T00:44:00-04:00</updated>

		<published>2002-03-18T00:44:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=5485#p5485</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=5485#p5485"/>
		<title type="html"><![CDATA[Pausing for user input?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=5485#p5485"><![CDATA[
Is there a way to make a script pause for user input?  basically I want to create a menu-driven (through dcc) script. <br><br>The script would be started with a CONNECT command, then handed over to the menu proc via CONTROL.  Hopefully, something like:<br><br>1. Go to A<br>2. Go to B<br>3. Go to C<br>----<br>Your selection?<br>----<br>could be created, then when the user types 1, another menu would come up, etc etc.<br><br>how do I make the script wait for the first input before moving on to the next menu level?<p>Statistics: Posted by Guest — Mon Mar 18, 2002 12:44 am</p><hr />
]]></content>
	</entry>
	</feed>
