Novaterm 9.6 User's Guide

found.

When one of the strings is found, the script continues on to the next
line. Therefor, our next few lines must figure out which of the
strings was detected, and respond to it appropriately.

First, let's check to see if the string Your Selection ==> was
found:

if check 1 then output "1^m"

There's a lot to this statement, so let's look at it in pieces.

The if command is a conditional statement. It checks to see if the
specified condition is true, and if it is, the command following the
word then is executed. If the condition is false, the command
following then is not executed, and the script continues on to the
next line.

In this case, the condition check 1 is telling Novaterm to check if
string number 1 (Your Selection ==>) was detected. If it was,
the script should execute the command:

output "1^m"

The output command simply sends the specified string (which must
be surrounded by quotation marks) to the modem. In this case, the
string consists of the character 1 and a RETURN. (The sequence ^m
represents the equivalent of the RETURN key, or CTRL-M. This
notation is identical to the way control characters may be embedded in
function key definitions. (See 3.1.4, Function keys for a detaled
explanation of this.)

Now, since we don't know which string was detected by the wait
command, we must include conditions for the other two strings:

if check 2 then output "voyager^m"
if check 3 then macro 1
if check 4 then end

After the wait command exits, if the detected string was not string
#1, the scripts falls through to the above statements. If the detected
string was string #2, the login prompt, the script responds with our
login name, followed by a RETURN.

If the detected string was string #3, the password prompt, the script
executes the macro command. The macro command outputs the
contents of the specified function key, as it is defined in the Edit

<---- Previous    Next ---->