home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
comm
/
ca24_1.zip
/
SCRIPTS.ZIP
/
CONNECT.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1989-02-14
|
2KB
|
72 lines
;
; Go into auto answer (echo off, answer on 2nd)
; Also: Return result codes, word form, with CONNECT 1200
;
ON ESCAPE GOSUB EXIT ; Escape pressed
SET PARITY NONE ; Turn off parity
SET DATA 8 ; Set 8 databits
SET MASK ON ; Mask received text to 7 bits
Restart:
LEGEND " Waiting for call"
Pause 3 ; Wait 3 seconds
HANGUP ; HANGUP and leave modem in cmd mode
PAUSE 3 ; Wait 3 secs
MESSAGE "^MWaiting..."
TRANSMIT "ATE0Q0V1X1S0=2 S7=30 S9=10^M"
;
; -----------------------------------------------------------------------
; ----- Wait for a connect
; -----------------------------------------------------------------------
;
Wait_Connect:
RGET S9 80 180 ; Wait for a line
IF NOT SUCCESS ; If nothing was read
GOTO Wait_Connect
ENDIF
FIND S9 "NO CARRIER" ; Look for a disconn
IF FOUND
GOTO Restart
ENDIF
FIND S9 "CONNECT" ; Anything else BUT CONNECT
IF NOT FOUND ; .. waits
GOTO Wait_Connect
ENDIF
;*** IF NOT CONNECTED ; SOme modems aren't fast enough
;*** GOTO Wait_Connect ; .. to set this right away
;*** ENDIF
;
; -----------------------------------------------------------------------
; ----- Change baud rate according to connect
; -----------------------------------------------------------------------
;
FIND S9 "1200" ; Test for 1200 baud
IF FOUND ; IF found
SET BAUD 1200 ; Set to 1200 baud
GOTO Finish ; We're done.
ENDIF
FIND S9 "2400" ; Test for 1400 baud
IF FOUND ; IF found
SET BAUD 2400 ; Set to 1400 baud
GOTO Finish ; We're done.
ENDIF
;
; None of the above... set to 300
;
SET BAUD 300 ; Set to 1200 baud
;
; Exit - set-up for conversational mode
;
Finish:
SET CHAT ON ; Set chat mode
SET CR CR_LF ; Incoming Cr's as CRLF
CLOG "* Auto-answer" ; Log it
;
; The exit is separately labelled to allow ESC to terminate quickly
;
Exit:
EXIT