home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / BLST10_2.ZIP / SAMPLES / TELENET.SCR < prev    next >
Encoding:
Text File  |  1990-09-19  |  2.2 KB  |  69 lines

  1. #:
  2. #:Telenet
  3. .LOGON
  4. ##############################  TELENET  ###################################
  5. #
  6. #  This telenet script will connect and leave a user at the telenet command
  7. #  prompt.  When entering telenet this script enters a cr,cr for 1200bps
  8. #  and a @,cr for everthing else (meaning 2400bps & 9600bps).
  9. #
  10. #  You may incorporate this script into the systems.scr script, use it as a 
  11. #  stand alone systems script or as a regular script.  If you choose to insert
  12. #  this script into systems.scr you must make three modifications.  When the
  13. #  systems.scr (or modems.scr) files are indexed our index utility is looking
  14. #  specifically for colons; therefore, the # must be deleted from the first
  15. #  two lines and from the last line of this file.  Once these items have been
  16. #  changed, copy this script into systems.scr and re-index (See the Users 
  17. #  manual for instructions on the index utility).
  18. #
  19. ############################################################################
  20. #
  21. #
  22. connect                               # make the connection    
  23. if @status not = "0"                  # if no connection - return with error
  24.    write "connection not estabished"
  25.    write "TELENET.SCR ABORTED"
  26.    return 1
  27.    end
  28. reps 4                                # try four times
  29. ttrap 2,"second wait"
  30. #
  31. #
  32. .begin                                # enter leading character     
  33. if @baudrate = "1200"
  34.    tsend cr
  35.    end
  36. else
  37.    tsend "@"
  38.    end
  39. #
  40. #
  41. .terminal_prompt                      # get terminal=  prompt
  42. tsend cr
  43. ttrap 7, "TERMINAL=", "@"
  44. if @status = "2"  return 0
  45. if @status = "1"                      # if terminal=  is received
  46.    goto .terminal_prompt              #    goto get @ prompt
  47.    end
  48. if reps                               # if nothing recognized
  49.    goto .begin                        #    try again
  50.    end
  51. else                                  # else
  52.    write " could not log in"          #    write an error message
  53.    write "TELENET SCRIPT ABORTED"     #    return with error
  54.    return 1
  55.    end
  56. #
  57. #
  58. .LOGOFF
  59.  return 0
  60. .UPLOAD
  61.  write "Uploads not available on telenet with this system script"
  62.  return 0
  63. .TRANSFER
  64.  write "Filetransfer not available on telenet with this system script"
  65.  return 0
  66. .END
  67. #:
  68.  
  69.