home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
comm
/
kermit23.zip
/
MSIHAY.TAK
< prev
next >
Wrap
Text File
|
1990-02-06
|
2KB
|
51 lines
; FILE HAYES.TAK
;
; An MS-DOS Kermit 3.0 script program for dialing a Hayes 2400 Smartmodem
; and compatibles. Also works with ROLMphone 244PC.
; Expects variable %\1 to contain the phone number; this is done by the
; DIAL macro defined in MSKERMIT.INI.
; Author: Christine M. Gianone, January 1990
;
COMMENT - Initial setup
def errstop echo Error: \%1\13,def \%1,hang,stop
set speed 2400 ; *** Change to 1200 for Smartmodem 1200
set input timeout proceed ; So IF SUCCESS and IF FAILURE can be used
set input echo off ; Don't echo modem test
output AT\13 ; Send "AT" and carriage return
input 2 OK ; Look for modem's "OK" response
if fail errstop {Turn on or connect your modem!}
set count 5 ; Modem is OK, set up dialing loop
clear ; Clear away old modem echoes
set input echo on ; From now on, show what's happening
echo \13Dialing \%1. Wait...\13\10 ; Dialing for the first time,
goto dial ; so skip the "Redialing" message
COMMENT - Dialing loop
:REDIAL
echo \13Redialing...\13\10 ; Give this message when redialing
:DIAL
output ATDT\%1\13 ; Dial the number
input 60 \10 ; Wait 60 secs for a linefeed from modem
if fail errstop {No response from modem.} ; No message within 1 minute
reinput 1 CONNECT ; Got a message, was it CONNECT?
if success goto speed ; If so, go and check speed
reinput 1 BUSY ; Not CONNECT, was it BUSY?
if failure errstop {No dialtone or no answer.} ; Neither one
Echo \13Busy... ; It's busy, say so
hangup ; Hang up the phone
pause 60 ; Wait one minute
if count goto redial ; Then go redial
COMMENT - Come here after 5 unsuccesful tries
errstp {It's always busy! I give up.}
:SPEED ; Connected!
pause 1 ; Wait one second for more text
reinput 1 2400 ; Was the message CONNECT 2400?
if succ set speed 2400 ; Yes, set speed to 2400
reinput 1 1200 ; Was it CONNECT 1200?
if success set speed 1200 ; If so, set speed to 1200
:DONE ; All done.
stop ; Stop executing this script.