home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
e
/
em200.zip
/
AUTOLOG.KRM
< prev
next >
Wrap
Text File
|
1992-04-29
|
4KB
|
146 lines
; -----------------------------------------------------------------------------
; Log on to a BBS and list new messages, saving them in msg.fil, then sign off
; -----------------------------------------------------------------------------
del msg.fil
log session msg.fil
; -----------------------------------------------------------------------------
; define macros and variables
; -----------------------------------------------------------------------------
def errstop echo \13\10\%1\13\10, goto :LOGOFF
def \%p 9289228 ;First Capitol BBS (Area code 314)
def \%f Don ;First name
def \%l Branson ;Last name
def \%a SIGNON ;Password
echo \13\10Phone number: \%p\13\10
clear ; Clear input buffer
set speed 2400
; -----------------------------------------------------------------------------
; Initialize modem
; -----------------------------------------------------------------------------
echo Initializing modem...\13\10
output ATZ\13
pause 2
output AT F1 Q0 V1 X4 S0=0\13
input 8 OK
if fail errstop {Can't initialize modem}
echo \13\10Modem initialized
; -----------------------------------------------------------------------------
; Dial the phone number
; -----------------------------------------------------------------------------
set input case ignore
set input timeout-action proceed
set input echo on
pause 1
set count 6 ; Set redial limit
define \%d \13Dialing
:REDIAL
run dtime
echo \%d... \%p \13\10
clear
output ATDT \%p\13
:CONLOOP
reinput BUSY
if success goto :BUSY
reinput CONNECT
if success goto :SPEED
goto :CONLOOP
:BUSY
echo \13Busy line
if NOT count goto :LOGOFF
echo \13Forcing hangup...\13\10
pause 1
output +++
pause 1
output \13ATH\13
input 3 OK
echo \13Pausing 1 minute before re-dialing.
pause 60
define \%d \13\10Redialing
goto :REDIAL
; -----------------------------------------------------------------------------
; Got connected, determine actual connect speed
; -----------------------------------------------------------------------------
:SPEED
define \%s 2400
reinput 1 2400
if success goto :GOTSPEED
define \%s 1200
reinput 0 1200
if failure define \%s 300
:GOTSPEED
set speed \%s
echo \13\10Logging in at \%s baud.
; -----------------------------------------------------------------------------
; Respond to system prompts
; -----------------------------------------------------------------------------
pause 5
:LOGIN
input 60 first name ; Enter first name
if failure errstop {No first name prompt}
output \%f\13
input 10 last name ; Enter last name
if failure errstop {No last name prompt}
output \%l\13
input 10 \%f \%l ; Respond to name confirmation
if failure errstop {No confirmation}
output y\13
input 10 password ; Enter password
if failure errstop {}
output \%a\13
; Scan through signon messages
:ELOOP
input 10 enter
if failure goto :LISTMESS
output \13
goto :ELOOP
:LISTMESS
reinput 5 Select ; Go to message section
if failure errrstop {}
output m\13
input 10 message number ; Go to message section a2
if failure errstop {}
output a2\13
input 10 message number ; List all new messages
if failure errstop {}
output =\13
; Wait for all messages to be listed
:READLOOP
input 10 message number
if failure goto :READLOOP
output g\13 ; Sign off
input 2 disconnect
if failure errstop {}
output y\13
input 2 leave a note
if failure errstop {}
output n\13
:LOGOFF
echo \13Forcing hangup...\13\10
pause 1
output +++
pause 1
output \13ATH\13
input 3 OK
exit