Echo command: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 13: Line 13:


* <span class="f_ListBul1">A un</span><span class="f_Para">quoted string that contains the message. </span>
* <span class="f_ListBul1">A un</span><span class="f_Para">quoted string that contains the message. </span>
* <span class="f_Para">A Client [[working_with_macro_functions.html|&amp;&amp;function]]. The result of the function execution is displayed as the message.</span>
* <span class="f_Para">A Client [[Working with Client functions (Debugger)|&amp;&amp;function]]. The result of the function execution is displayed as the message.</span>


<span class="f_Para">The message string starts with the first non-blank character after the </span><span class="f_Monospace">echo</span><span class="f_Para"> keyword, and it continues as far as the end of the line. For example: </span>
<span class="f_Para">The message string starts with the first non-blank character after the </span><span class="f_Monospace">echo</span><span class="f_Para"> keyword, and it continues as far as the end of the line. For example: </span>
Line 19: Line 19:
<p class="syntax">echo Have a nice day! </p>
<p class="syntax">echo Have a nice day! </p>


<span class="f_Para">The message is normally displayed in a standard Windows informational box (entitled </span><span class="f_GUIlabel">Macro message</span><span class="f_GUIlabelTable">).</span><span class="f_Para"> If the [[using_macro_console_cmdline.html#macro_console|macro console]] is open, however, the message is sent to the console instead. </span>
<span class="f_Para">The message is normally displayed in a standard Windows informational box (entitled </span><span class="f_GUIlabel">Macro message</span><span class="f_GUIlabelTable">).</span><span class="f_Para"> If the [[Using the console and command line#The Console|macro console]] is open, however, the message is sent to the console instead. </span>


<span class="f_EmphRed">Note:</span><span class="f_Notes"> If you are specifying a Client [[setup_ui_xml_file.html#mapping_element|mapping command]] and your message includes an ampersand character (&amp;), you must XML entity encode the character. For example, to map the command </span><span class="f_Monospace">echo &amp;foo</span><span class="f_Notes">, you specify it like this: </span>
'''Note:'''<span class="f_Notes"> If you are specifying a Client [[Setting up the ui.xml file#To set up a ui.xml file:|mapping command]] and your message includes an ampersand character (&amp;), you must XML entity encode the character. For example, to map the command </span><span class="f_Monospace">echo &amp;foo</span><span class="f_Notes">, you specify it like this: </span>


<span class="f_CodeExListTable"> &lt;mapping</span><span class="f_CodeExListTable" style="font-size: 11px;"> </span><span class="f_CodeExListTable">command</span><span class="f_=XmpPrintTable">=</span><span class="f_CodeExListTable">&quot;echo</span><span class="f_CodeExListTable" style="font-size: 11px;"> </span><span class="f_CodeExListTable">&amp;amp;foo&quot;</span><span class="f_CodeExListTable" style="font-size: 11px;"> </span><span class="f_CodeExListTable">button</span><span class="f_=XmpPrintTable">=</span><span class="f_CodeExListTable">&quot;button13&quot;/&gt;</span>
<p class="syntax"><span class="f_CodeExListTable"> &lt;mapping</span><span class="f_CodeExListTable" style="font-size: 11px;"> </span><span class="f_CodeExListTable">command</span><span class="f_=XmpPrintTable">=</span><span class="f_CodeExListTable">&quot;echo</span><span class="f_CodeExListTable" style="font-size: 11px;"> </span><span class="f_CodeExListTable">&amp;amp;foo&quot;</span><span class="f_CodeExListTable" style="font-size: 11px;"> </span><span class="f_CodeExListTable">button</span><span class="f_=XmpPrintTable">=</span><span class="f_CodeExListTable">&quot;button13&quot;/&gt;</span></p>
|-
|-
| '''Client menu:'''
| '''Client menu:'''

Revision as of 04:29, 29 November 2022

Action:

Displays a message to the user.

Syntax:

echo message

where message is one of these:

  • A unquoted string that contains the message.
  • A Client &&function. The result of the function execution is displayed as the message.

The message string starts with the first non-blank character after the echo keyword, and it continues as far as the end of the line. For example:

echo Have a nice day! 

The message is normally displayed in a standard Windows informational box (entitled Macro message). If the macro console is open, however, the message is sent to the console instead.

Note: If you are specifying a Client mapping command and your message includes an ampersand character (&), you must XML entity encode the character. For example, to map the command echo &foo, you specify it like this:

 <mapping command="echo &amp;foo" button="button13"/>

Client menu:
Introduced: Build 27