Readmsg – Visara Master Console Center Scripting Guide User Manual
Page 227
Chapter 6 Obsolete Material
Scripting Guide
227
READMSG
Syntax:
READMSG( $Msg, Wait, *Timeout[, Port [, Filter]])
Description:
Reads the next message from a script’s message queue.
Action:
Reads the next message in a queue. The next message is defined by a
script’s current message pointer created with the QUEUE() command.
The entire message is placed in the array specified by the $MSG array
parameter. Each word in the message is placed sequentially by
position into the array’s elements ($Msg[ 1] contains the 1st word,
$Msg[ 2] contains the 2nd word, $Msg[ 3] contains the 3rd word, and so
on.).
When the queue is empty, the READMSG command acts as specified
by the Wait and *Timeout parameters.
Parameters:
$Msg. Normal string array. The array to populate with each word
from the message. Each array element holds one word. The words are
split up by “white space”—one or more space characters.
Wait. Numeric expression. The number of seconds to wait before
timing out. When the queue is empty, this number specifies how long
the command waits for a message.
*Timeout. Label. The label to jump to when the READMSG()
command times out.
Port. Numeric expression. Optional. The OS printer console from
which to read a message. A queue must already have been created for
the specified port with the QUEUE() command. If not specified, a
message is read from the default queue (the OS printer console the
script is executing on).
Filter. String Expression. Optional. The text in this string acts as
filter criteria—the criteria text must be in the console message in order
for READMSG to receive it. Messages will only “appear” to READMSG
if they contain the criteria text. A Filter value of null string “” is the
same as omitting the Filter parameter.
Returns:
N/A.
Notes:
1. QUEUE( ON) must be executed before the READMSG command.
2. READMSG() only reads OS printer console messages. If a port is
specified, it must be an OS printer console port. If a port is not
specified, the script must be executing on an OS icon.