From WikiChip
Difference between revisions of "mirc/commands/echo"
m |
m |
||
Line 1: | Line 1: | ||
{{mirc title|/echo Command}} | {{mirc title|/echo Command}} | ||
− | The '''/echo command''' prints text to the specified window. This command does not send anything to the server | + | The '''/echo command''' prints text to the specified window. This command does not send anything to the server; text is only shown in the window. |
+ | |||
+ | '''Note:''' If you use /echo to send text to a custom listbox window which has been opened by {{mIRC|/window|/window -s}}, the line will be added added at the bottom of the window rather than being inserted in the correct sort position. | ||
− | |||
== Synopsis == | == Synopsis == | ||
− | /echo [color] [-deghiNtsaqlbfnmr] [window] <text> | + | /echo [color-number] [-deghiNtsaqlbfnmr] [window] <text> |
− | /echo | + | /echo -c[deghiNtsaqlbfnmr] <color-name> [window] <text> |
== Switches == | == Switches == | ||
Line 34: | Line 35: | ||
* '''<text>''' - The text to be printed | * '''<text>''' - The text to be printed | ||
− | == | + | == Examples == |
A Hello World example: | A Hello World example: | ||
− | |||
<syntaxhighlight lang="mIRC">/echo -a Hello World!</syntaxhighlight> | <syntaxhighlight lang="mIRC">/echo -a Hello World!</syntaxhighlight> | ||
A simple example of a loop that prints a few lines: | A simple example of a loop that prints a few lines: | ||
− | |||
<syntaxhighlight lang="mIRC">alias example { | <syntaxhighlight lang="mIRC">alias example { | ||
var %x = 5 | var %x = 5 |
Revision as of 11:58, 17 October 2017
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
The /echo command prints text to the specified window. This command does not send anything to the server; text is only shown in the window.
Note: If you use /echo to send text to a custom listbox window which has been opened by /window -s, the line will be added added at the bottom of the window rather than being inserted in the correct sort position.
Contents
Synopsis
/echo [color-number] [-deghiNtsaqlbfnmr] [window] <text> /echo -c[deghiNtsaqlbfnmr] <color-name> [window] <text>
Switches
- -c - Indicates the <color_name> parameter was provided.
- -e - Encloses the text with a pair of line separators
- -g - Prevents the text from being logged.
- -h - Applies a hard-wrap on the text.
- -i<N> - Wraps the text by <N> characters.
- -t - Adds a timestamp to the text if the timestamp is enabled (global or for that window)
- -s - prints to the status window
- -a - prints to the active window
- -d - prints to the single message window
- -q - Honors the $show flag. (If the alias was called with the . prefix)
- -n - Prevents switchbar/treebar status color change
- -m - Treats the line as user message instead of an event
Settings Related:
- -r - Applies the strip settings to the text.
- -l - Applies the highlight settings to the text
- -b - Applies the beep settings to the window.
- -f - Applies the flash settings to the window.
Parameters
- [color] - A numeric color value (0 to 15)
- <color_name> - Used with the -c switch. One of the following: Action, ctcp, highlight, info, info2, invite, join, part, quit, kick, mode, topic, nick, normal, notice, notify, other, own, wallops, whois
- [window] - The target window/channel/query
- <text> - The text to be printed
Examples
A Hello World example:
/echo -a Hello World!
A simple example of a loop that prints a few lines:
alias example { var %x = 5 while (%x) { echo -a This is example line $v1 $+ . dec %x } }
The above will print:
This is example line 5. This is example line 4. This is example line 3. This is example line 2. This is example line 1.
Compatibility
Added: mIRC v3.7
Added on: 12 Oct 1995
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also
mIRC commands list