Difference between revisions of "Accept.input"

From AGI Wiki
Jump to navigationJump to search
Line 1: Line 1:
The '''accept.input''' command allows the player to enter input, if they have been prevented from doing so by a call to [[prevent.input]]. If the input prompt is currently hidden, it is displayed again, along with any text that was on it when it was hidden.
+
The '''accept.input''' command displays the [[input line]] and allows a player to enter text input.
  
<code>accept.input();</code>
+
== Syntax ==
  
&nbsp;
+
accept.input();
  
== <br />Parameters ==
+
== Parameters ==
  
 +
*None
  
This command does not take any parameters.
+
== Remarks ==
  
&nbsp;
+
The input line is hidden by default when AGI starts, and needs to be enabled with '''accept.input'''. The line is displayed on the row specified by the most recent [['''configure.screen''']] command. Use the '''[[prevent.input]]''' command to hide the input line.
== Possible errors ==
 
  
None known.
+
When the input line is displayed, any text that was on the line at the time it was hidden will be displayed as well.
  
&nbsp;
+
== Possible Errors ==
== Examples ==
 
  
The following example hides the input line and then displays it again. Note that this will likely have no obvious effect if executed exactly as it appears below, because the input line will be disabled and immediately re-enabled.
+
None.
  
<code>prevent.input(); // hides the input line</code><br />
+
== Example ==
<code>accept.input(); // shows the input lin</code>e
 
  
&nbsp;
+
<div class="CodeBlockHeader">Code:</div>
== See Also ==
+
<syntaxhighlight lang="agi">
 +
prevent.input(); [ input prompt is hidden, and player cannot enter text input
 +
...
 +
'''accept.input();''' [ input prompt is restored/redisplayed, including any text
 +
                      [ that was on it when it was hidden
 +
</syntaxhighlight>
  
* [[prevent.input]]
+
== Technical Information ==
  
&nbsp;
+
{| border="1" cellpadding="2"
== Sources ==
+
| style="background-color: #efefef" width="200" | '''Required Interpreter Version:'''
 +
| width="175" | Available in all AGI versions.
 +
|-
 +
| style="background-color: #efefef" | '''Byte-Code Value:'''
 +
| 120 (0x78 hex)
 +
|}
  
Some of the text in the article is taken from the [[AGI Studio Help File]].
+
== See Also ==
 
 
&nbsp;
 
  
[[Category:Logic]]
+
*[[System Commands]]
[[Category:Logic Commands]]
+
*'''[[prevent.input]]'''
[[Category:System Commands]]
+
*'''[[configure.screen]]'''

Revision as of 17:39, 22 March 2019

The accept.input command displays the input line and allows a player to enter text input.

Syntax

accept.input();

Parameters

  • None

Remarks

The input line is hidden by default when AGI starts, and needs to be enabled with accept.input. The line is displayed on the row specified by the most recent '''configure.screen''' command. Use the prevent.input command to hide the input line.

When the input line is displayed, any text that was on the line at the time it was hidden will be displayed as well.

Possible Errors

None.

Example

Code:
prevent.input(); [ input prompt is hidden, and player cannot enter text input 
...
'''accept.input();''' [ input prompt is restored/redisplayed, including any text
                       [ that was on it when it was hidden

Technical Information

Required Interpreter Version: Available in all AGI versions.
Byte-Code Value: 120 (0x78 hex)

See Also