Novaterm 9.6 User's Guide

  1. In response to the string Your Selection ==> we typed a 1

  2. and pressed RETURN.
  3. In response to the string login:, we typed the user name

  4. voyager and pressed RETURN.
  5. In response to the string Password:, we typed our password

  6. and pressed RETURN.
After responding to those three prompts, we were logged in.

Therefore, we want our script to automatically respond to these three
prompts for us.


 

After responding to the prompts, we want the script to end. To do
this, we'll find a fourth string that, when detected, ends the script. The
string Command?, at the end of the sample capture file, is Eskimo
North's command prompt, which is where we want to take back
control. Therefore, in response to the string Command?, we'll end the
script.


 

Now that we know what to look for, let's start writing the script. First
of all, let's have our script monitor the incoming text for the four
strings we identified above. In a Novaterm script, we may specify up
to six strings to search for at one time, and then we put the script into
a loop that enters terminal mode and waits until one of those strings is
detected.


 

To set up four search strings, we use the check script command.
The next four lines of our script are:

check1 "Your Selection ==>"
check2 "login:"
check3 "Password:"
check4 "Command?"


 

The check command takes two arguments. The first is a number
between one and six; this identifies an index number for the string.
The second argument is the string itself. You must put quotation
marks around the string to identify it.


 

The above four commands merely set up our search strings. Now, we
must put Novaterm into a loop and wait for the first occurrence of one
of the strings. To do this, the following line of the script must be:

wait
 

The wait command puts Novaterm into terminal mode. Novaterm
displays incoming text until one of the search strings is detected. The
script will not continue beyond this line until one of the strings is

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