<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://agiwiki.sierrahelp.com//index.php?action=history&amp;feed=atom&amp;title=Menu.input</id>
	<title>Menu.input - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://agiwiki.sierrahelp.com//index.php?action=history&amp;feed=atom&amp;title=Menu.input"/>
	<link rel="alternate" type="text/html" href="http://agiwiki.sierrahelp.com//index.php?title=Menu.input&amp;action=history"/>
	<updated>2026-09-27T14:11:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>http://agiwiki.sierrahelp.com//index.php?title=Menu.input&amp;diff=12480&amp;oldid=prev</id>
		<title>Andrew Korson: Created page with &quot;The &#039;&#039;&#039;menu.input&#039;&#039;&#039; command brings up the menu at the beginning of the next interpreter cycle.  == Syntax ==  menu.input();  == Remarks ==  When the &#039;&#039;&#039;menu.input&#039;&#039;&#039;...&quot;</title>
		<link rel="alternate" type="text/html" href="http://agiwiki.sierrahelp.com//index.php?title=Menu.input&amp;diff=12480&amp;oldid=prev"/>
		<updated>2019-04-11T18:33:59Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The &amp;#039;&amp;#039;&amp;#039;menu.input&amp;#039;&amp;#039;&amp;#039; command brings up the &lt;a href=&quot;/index.php?title=Menu&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Menu (page does not exist)&quot;&gt;menu&lt;/a&gt; at the beginning of the next &lt;a href=&quot;/index.php/Interpreter_cycle&quot; title=&quot;Interpreter cycle&quot;&gt;interpreter cycle&lt;/a&gt;.  == Syntax ==  menu.input();  == Remarks ==  When the &amp;#039;&amp;#039;&amp;#039;menu.input&amp;#039;&amp;#039;&amp;#039;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The &amp;#039;&amp;#039;&amp;#039;menu.input&amp;#039;&amp;#039;&amp;#039; command brings up the [[menu]] at the beginning of the next [[interpreter cycle]].&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
menu.input();&lt;br /&gt;
&lt;br /&gt;
== Remarks ==&lt;br /&gt;
&lt;br /&gt;
When the &amp;#039;&amp;#039;&amp;#039;menu.input&amp;#039;&amp;#039;&amp;#039; command executes, it first checks the value of [[reserved flag]] [[f14 (menu enabled)]]; if f14 is FALSE, the command does nothing. If f14 is TRUE, &amp;#039;&amp;#039;&amp;#039;menu.input&amp;#039;&amp;#039;&amp;#039; sets an internal flag that tells AGI to display the menu at the start of the next [[interpreter cycle]]. (See the &amp;#039;&amp;#039;&amp;#039;[[allow.menu]]&amp;#039;&amp;#039;&amp;#039; command for additional information on controlling menus in later [[versions]] of AGI.)&lt;br /&gt;
&lt;br /&gt;
Once the menu is displayed, the [[interpreter cycle]] is paused until the player selects an item from the menu, or presses the ESC key to exit without selecting. If a menu item was selected, its corresponding [[controller]] is added to the [[input queue]].&lt;br /&gt;
&lt;br /&gt;
The most common method used by Sierra to display the menu was to assign the ESC key to a [[keyboard controller]], which would then call the &amp;#039;&amp;#039;&amp;#039;menu.input&amp;#039;&amp;#039;&amp;#039; command. However, you could just as easily assign a different key if desired.&lt;br /&gt;
&lt;br /&gt;
== Possible Errors ==&lt;br /&gt;
&lt;br /&gt;
You must create and submit a [[menu]] in order for &amp;#039;&amp;#039;&amp;#039;menu.input&amp;#039;&amp;#039;&amp;#039; command to work. If &amp;#039;&amp;#039;&amp;#039;menu.input&amp;#039;&amp;#039;&amp;#039; is called before a menu has been created and submitted, AGI will access invalid data while trying to display the menu, which will most likely [[crash AGI]].&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;menu.input&amp;#039;&amp;#039;&amp;#039; command should only be executed on the [[graphics screen]]. Calling this command on the [[text screen]] is possible, but menus will not display correctly. You should disable menus by setting [[reserved flag]] [[f14 (menu enabled)]] to FALSE whenever you are displaying the text screen.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;agi&amp;quot;&amp;gt;&lt;br /&gt;
[ assume menu has been created&lt;br /&gt;
submit.menu();  [ sets up the menu so it can be accessed&lt;br /&gt;
set(f14);       [ enable menu&lt;br /&gt;
... &lt;br /&gt;
if(controller(c25))  [ assume c25 is assigned to the ESC key&lt;br /&gt;
  {&lt;br /&gt;
  menu.input();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Technical Information ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color: #efefef&amp;quot; width=&amp;quot;200&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Required Interpreter Version:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| width=&amp;quot;175&amp;quot; | Available in version 2.272 and above.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color: #efefef&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Byte-Code Value:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| 161 (0xA1 hex)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Player Input Commands]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Menus in AGI]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[allow.menu]]&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Category:Commands]]&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Andrew Korson</name></author>
	</entry>
</feed>