Setting up for the Internet
24
Using the READ command to send text:
Use the
READ
command in place of the
SEND
command when the user is required to enter details every time they login.
For example, you may wish to use the
READ
command when the user connects to a ‘challenge response’ system which
displays a code, and then expects to receive a corresponding password to match that code. When the
READ
command is
used in a script, the Post-Connection Terminal (PCT) dialog will be displayed. If the user types text into the PCT dialog
and presses
Enter
, the text (including the carriage return character) are sent to the server. The following section of script
uses the
SEND
command to send the login name, followed by the
READ
command to let the user enter their password:
sendlogin:
SEND logi<0x0d>
WAIT 15
{
"word:" sendpass
}
sendpass:
READ
After sending the login name, the script jumps to the
sendpass
procedure. In the
sendpass
procedure, the
READ
command lets the user type their password in the PCT dialog. After the user types in their password and presses
Enter
,
the text is sent to the server and the script continues at the point after the
READ
command.
Exiting the script
Once your script has instructed the machine to wait for all the appropriate prompts and to send all the appropriate
responses, it should stop running. You can instruct it to do this by using the
EXIT
command, as in the following example:
sendpass:
SEND logi<0x0d>
WAIT 15
{
“ello” success
}
success:
EXIT
Here the machine sends your password, then waits to receive
ello
(your service provider’s server will normally respond
with a message such as “hello” or “OK” when you have logged in successfully). If this is received, the machine jumps to
the
success
procedure, which stops running the script.