COMMENT - Initial setup def errstop echo Error: \%1\13,def \%1,hang,stop set speed 2400 ; Dial at 2400 bps set input timeout proceed ; Use IF SUCC/FAIL set input echo off ; Don't echo modem test output AT\13 input 2 OK if fail errstop {Turn on or connect your modem!} set count 5 ; Set up dialing loop clear ; Clear away old modem echoes set input echo on ; Show use what's happening echo \13Dialing \%1. Waiting...\13\10 ; First time, goto dial ; Skip "Redialing" message COMMENT - Dialing loop :REDIAL echo \13Redialing...\13\10 :DIAL output ATDT\%1\13 ; Dial the number input 60 \10 ; Wait for linefeed if fail errstop {No response from modem.} reinput 1 CONNECT ; Got msg, was it CONNECT? if success goto speed ; Got it, check speed reinput 1 BUSY ; No connect, busy? if failure errstop {No dialtone or no answer.} 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 for more text reinput 1 2400 ; CONNECT 2400? if succ set speed 2400 reinput 1 1200 ; Is it 1200? if success set speed 1200 :DONE ; We know the speed ; ; pause 2 ; Pause for message ; set terminal clear ; Clear screen ; connect ; Begin terminal emulation