<doc>
	<legacy_id>2448</legacy_id>
	<name>answer</name>
	<type>command</type>

	<syntax>
		<example>answer [<i>iconType</i>] <i>prompt</i> [with <i>button1</i> [or <i>buttons</i>]] [titled <i>windowTitle</i>] [as sheet]</example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Displays a <glossary tag="dialog box">dialog box</glossary> with a <keyword tag="message box">message</keyword> and up to seven buttons.</summary>

	<examples>
<example>answer &quot;Go ahead?&quot; with &quot;Yes&quot; or &quot;No&quot; or &quot;Maybe&quot;</example>
<example>answer information filesProcessed &amp;&amp; &quot;files were exported.&quot;</example>
<example><p>answer &quot;Greetings!&quot; with &quot;Log In&quot; or &quot;Cancel&quot; titled &quot;Login&quot;</p></example>
<example>answer the currPrompt of me with &quot;OK&quot; or &quot;Cancel&quot; as sheet</example>
	</examples>

	<history>
		<introduced version="1.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version="4.6.1">Added Support for Android and iOS.</changed>
<changed version="2.0">2.0</changed>
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
		<ios/>
		<android/>
	</platforms>

	<classes>
		<desktop/>
		<web/>
		<mobile/>
	</classes>

	<security>
	</security>


	<classification>
	</classification>

	<references>
		<command tag="answer printer">answer printer Command</command>
		<command tag="answer file">answer file Command</command>
		<command tag="answer effect">answer effect Command</command>
		<command tag="ask">ask Command</command>
		<command tag="breakpoint">breakpoint Command</command>
		<command tag="answer color">answer color Command</command>
		<command tag="answer page setup">answer page setup Command</command>
		<keyword tag="gRevAppIcon">gRevAppIcon Keyword</keyword>
		<keyword tag="gRevSmallAppIcon">gRevSmallAppIcon Keyword</keyword>
		<keyword tag="gRevProfileReadOnly">gRevProfileReadOnly Keyword</keyword>
	</references>

	<description>
	<overview>Use the <b>answer</b> <glossary tag="command">command</glossary> to get information or a confirmation from the user before continuing. The user must click one of the buttons to dismiss the <glossary tag="dialog box">dialog</glossary> box.</overview>

		<parameters>
  <parameter>
    <name>iconType</name>
    <description>Is displayed on the left side of the dialog box. If you do not specify an icon, none is displayed. One of the following types:</description>
    <options title="">
      <option>
        <item>information</item>
        <description/>
      </option>
      <option>
        <item>question</item>
        <description/>
      </option>
      <option>
        <item>error</item>
        <description/>
      </option>
      <option>
        <item>warning</item>
        <description/>
      </option>
    </options>
  </parameter>
  <parameter>
    <name>prompt</name>
    <description>Is a string or any expression that evaluates to a string. The dialog box expands if necessary to fit the contents on desktops, display space on iOS and Android devices can be more restrictive and not provide enough space to expand sufficiently.</description>
  </parameter>
  <parameter>
    <name>buttons</name>
    <description>Up to seven buttons can be specified, separated by the word "or". The buttons and the dialog box expand if necessary to fit the button names; the total number of characters in the buttons is limited only by the maximum dialog box size and the font size. Display space on iOS and Android devices can be more restrictive and not provide enough space to expand sufficiently. The last button you specify is the default button. Pressing Return or Enter is equivalent to clicking the default button. If you do not specify any button names, the dialog box contains a single OK button.</description>
  </parameter>
  <parameter>
    <name>windowTitle</name>
    <description>If specified, appears in the title bar of the dialog box. If you do not specify a windowTitle, the title bar is blank.</description>
  </parameter>		</parameters>

	<value></value>
	<comments>The <i>prompt</i> can be either formatted text (in the <property tag="HTMLText">htmlText</property> <glossary tag="property">property's</glossary> format) or plain text. If the <i>prompt</i> contains &lt;p&gt; or a start/end tag pair, the <b>answer</b> <glossary tag="command">command</glossary> assumes the text is in the same format as the <property tag="HTMLText">htmlText</property> <glossary tag="property">property</glossary>. Otherwise, the <b>answer</b> <glossary tag="command">command</glossary> assumes the text is plain text.<p></p><p>The name of the button the user chooses is placed in the <b>it</b> <glossary tag="variable">variable</glossary>.</p><p></p><p>The position and appearance of the dialog box varies between platforms. On Mac OS systems, the dialog box is centered on the screen; on Unix and Windows systems, the dialog box is centered over the active window. On Windows systems, the buttons are shown in reverse order (the first button is on the right side).</p><p></p><p>On OS X systems, the image specified in the <b>gRevAppIcon</b> <glossary tag="variable">variable</glossary> appears as the application icon in the <b>answer</b> <glossary tag="dialog box">dialog box</glossary> (unless the answer...as sheet form is used). If you specify an <i>iconType</i>, the <keyword tag="image">image</keyword> specified in the <keyword tag="gRevSmallAppIcon">gRevSmallAppIcon</keyword> <glossary tag="variable">variable</glossary> is used instead, along with the special icon specified by the <i>iconType</i>.</p><p></p><p>If the as sheet form is used, the dialog box appears as a sheet on OS X systems. On other systems, the as sheet form has no effect and the dialog box appears normally. Attempting to open a sheet from within another sheet displays the second <i>stack</i> as a <glossary tag="modal dialog box">modal dialog box</glossary> instead.</p><p></p><p></p><cp_note>On <glossary tag="OS X">OS X systems</glossary>, there is no image for the question icon. Therefore, the information icon appears instead. In addition, the image specified by the <keyword tag="gRevAppIcon">gRevAppIcon keyword</keyword> appears if you don't specify an <i>iconType</i>. If you specify an <i>iconType,</i> the image specified by the <keyword tag="gRevSmallAppIcon">gRevSmallAppIcon keyword</keyword> appears instead, along with the standard icon specified by the <i>iconType</i>. Android and iOS do not support <i>iconType</i> and 'as sheet'.</cp_note><p></p><p></p><cp_note>The order in which the buttons on the answer dialog appear is platform-dependent. On Windows and Unix systems, the default button is on the left. On Mac OS and OS X systems, to confirm with Apple human interaction guidelines, the default button is always on the right. On iOS and Android, the buttons usually appear from top to bottom.</cp_note><p></p><p></p><cp_note>Mobile does not support <i>iconType</i> and 'as sheet'.</cp_note><p></p><p></p><change><p>The answer...as sheet form was introduced in version 2.0.</change><p>The ability to provide formatted text for the <i>prompt</i> was introduced in version 2.0.</p></comments>
	</description>
</doc>