home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / comm / ca24_1.zip / SCRIPTS.ZIP / TELENET.CMD < prev   
OS/2 REXX Batch file  |  1988-08-11  |  2KB  |  47 lines

  1. ;
  2. ;    Make connection to TELENET.  The dialing directory (or current
  3. ;    .. setting define parity and speed).
  4. ;
  5.     LEGEND " Dialing Telenet... "
  6.     DEFTIME "60"            ; Wait 60 seconds for an incoming string
  7.     IF NOT LINKED        ; If script not invoked from Alt-D
  8.        DIAL "10"            ; Call dial dir entry number 10 (Telenet)
  9.        IF FAILED        ; IF esc out
  10.           EXIT        ; terminate script
  11.           ENDIF        ; End if failed
  12.        ENDIF        ; End if not linked
  13. ;
  14. ;    Make connection according to the dialing directory's parity/speed
  15. ;    .. i.e: parity and speed make a difference in how we connect
  16. ;
  17.     COMPARMS S1            ; Get current settings
  18.     IF STRCMP "N" S1(5:5)           ; If no parity
  19.        IF STRCMP "2400" S1(0:3)     ; If 2400 baud connect Send @D<cr>
  20.           PAUSE 1            ;    Wait for the modem to settle
  21.           TRANS "@"                 ;    Send @D<cr> slowly
  22.           PAUSE 1            ;    Wait a moment
  23.           TRANS "D"                 ;    Set to 8N1
  24.           PAUSE 1            ;    Wait a moment
  25.           TRANS "!"                 ;    Set to 8N1
  26.        ELSE             ; ELSE 300/1200 (send <cr>D<cr>)
  27.           PAUSE "1"                 ;    Wait for the modem to settle down
  28.           TRANSMIT "!D"             ;    Transmit Carriage return <CR> D
  29.           TRANSMIT "!"              ;    .. (8 bit identifier)
  30.           ENDIF
  31.     ELSE                ; ELSE even or odd parity
  32.        PAUSE "1"                    ;    Wait for the modem to settle down
  33.        TRANSMIT "!"                 ;    Transmit Carriage return <CR>
  34.        PAUSE "1"                    ;    Wait 1 sec
  35.        TRANSMIT "!"                 ;    Transmit Carriage return <CR>
  36.        ENDIF
  37. ;
  38. ;    Send terminal identification
  39. ;
  40.     WAITFOR "TERMINAL="     ; Wait for the prompt
  41.     TRANSMIT "D1!"          ; Set terminal type
  42.     WAITFOR "@"             ; Wait for next prompt
  43.     SET BSUPPRESS OFF    ; Turn off blank line suppression
  44.     SET MASK ON        ; Turn on high bit mask
  45.     SET CDISPLAY ON     ; Display ctl chars
  46.     ALARM            ; Sound alarm - we're done
  47.