Figure 4: After you compile it under BACKDOWN, this sample script will log you onto ZiffNet. Note that the user ID and password shown must be replaced with your user Id and password.
; Dial up Ziffnet and log in.
; This script is designed to work with a modem using an AT-command set.
O 2400 8N1 7BIT B+ NOCASE
; Init the modem
T 5 ReInit
:Init
S ATZ^M
W 3
S ATE0V1^M
R OK
G Dial
; Only reaches here if first init fails
:ReInit
T 5 FailInit
G Init
; Die gracefully if modem does not respond
:FailInit
N Modem did not respond^M
G End
; Dial ZiffNet
:Dial
N ^MDialing ..
T 60 NoAnswer
W 1
; Replace "xxx-xxxx" with your local Compuserve telephone number
S ATDTxxx-xxxx^M
R CONNECT
W 1
N ^MConnected^m
W 2
; Send userid
S ^C
R User ID:
; Replace "yyyyy,yyy" with your account number
S yyyyy,yyy^M
; Send Password
R Password:
; Replace "Your:password:Here" with your password
S Your:password:Here^M
N ^M^G --- Login Complete --- ^G^M
G End
: NoAnswer - Hangup and tell operator
H
N ^G -- Line busy or your modem isn't working -- ^G^M
: End
; Recompile this script with the command BD /C ZIFFNET
Figure 5: This short script demonstrates how command line parameters are specified. Much like a batch file's parameters, they are referenced as %1, %2, and so on.