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

  1. #:
  2. #:Easylink
  3. .LOGON
  4. ###############################  EASYLINK  ####################################
  5. #
  6. #  This Easylink script will connect, log a user in and leave them at the
  7. #  PTS command prompt.  The automatic login process is dependent on
  8. #  the userid and password of the current set up file, if either of these 
  9. #  are null the script will return control to the user to complete the log
  10. #  in manually.  Hint: watch out for blank characters in these fields.  For
  11. #  the userid the user should put in their terminal type, a space and then
  12. #  their Easylink ID.  The password should contain the users username, a
  13. #  period and then their password.
  14. #
  15. #  You may incorporate this script into the systems.scr script, use it as a 
  16. #  stand alone systems script or as a regular script.  If you choose to insert
  17. #  this script into systems.scr you must make three modifications.  When the
  18. #  systems.scr (or modems.scr) files are indexed our index utility is looking
  19. #  specifically for colons; therefore, the # must be deleted from the first
  20. #  two lines and from the last line of this file.  Once these items have been
  21. #  changed, copy this script into systems.scr and re-index (See the Users 
  22. #  manual for instructions on the index utility).
  23. #
  24. ###############################################################################
  25. #
  26. #
  27. connect                               # make the connection    
  28. if @status not = "0"                  # if no connection - return with error
  29.    write "connection not estabished"
  30.    write "EASYLINK SCRIPT ABORTED"
  31.    return 1
  32.    end
  33. reps 3                                # try three times
  34. #
  35. #
  36. .begin                                # try and detect Easylink
  37. ttrap 10, "ID?", "PTS"
  38. if @status = "2"  return 0
  39. if @status = "0"                      # if nothing was recognized
  40.    if reps                            #    and reps try again
  41.       tsend cr
  42.       goto .begin
  43.       end                         
  44.    write "could not obtain ID prompt" # else
  45.    write "EASYLINK SCRIPT ABORTED"    #    write an error message
  46.    return 1                           #    return with error
  47.    end
  48. #
  49. #
  50. .log_in                               # an ID? prompt was detected, log in
  51. if @userid   = ""  return 0
  52. if @password = ""  return 0
  53. tsend @userid," ",@password, cr       # send the log in string
  54. ttrap 10, "ID?", "PTS"
  55. if @status = "2"  return 0            # ok, return
  56. if @status = "1" and reps             # try again
  57.    goto .log_in
  58.    end
  59. if @status = "0"                      # if nothing was recognized
  60.    if reps                            #    and reps try again
  61.       tsend cr
  62.       goto .begin
  63.       end                         
  64.    write "could not obtain PTS prompt" # else
  65.    write "EASYLINK SCRIPT ABORTED"     #    write an error message
  66.    return 1                            #    return with error
  67.    end
  68. return 1
  69. #
  70. #
  71. .LOGOFF
  72.  tsend "quit",cr
  73.  ttrap 30, "NO CARRIER"
  74.  if @status = "0"  return 1
  75.  return 0
  76. .UPLOAD
  77.  write "Uploads not available on Easylink with this system script"
  78.  return 0
  79. .TRANSFER
  80.  write "Filetransfer not available on Easylink with this system script"
  81.  return 0
  82. .END
  83. #:
  84.  
  85.