home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / n / newscr.zip / NEWSCR.EXE / TELENET.SCR < prev    next >
Text File  |  1993-01-04  |  2KB  |  57 lines

  1. !---------------------------------------------------------------------!
  2. !                                                                     !
  3. !  Copyright (c) 1991                                                 !  
  4. !  by CompuServe Incorporated, Columbus, Ohio                         !
  5. !                                                                     !
  6. !  The information in this software is subject to change without      !
  7. !  notice and should not be construed as a commitment by CompuServe.  !
  8. !                                                                     !
  9. !  TELENET Script:                                                    !
  10. !     Connect to SprintNet                                            ! 
  11. !     Success:  returns %Success                                      !
  12. !     Failure:  saves error msg in %FailureMsg and returns %Failure   !
  13. !                                                                     !
  14. !     $Revision::   1.5      $                                        !
  15. !                                                                     !
  16. !---------------------------------------------------------------------!
  17.  
  18.     Attempts = 3;
  19.     on cancel goto SprintNet_Cancelled;
  20.     show "Connecting to SprintNet";
  21.     send "@";
  22.     wait until 1;       ! pause required for 2400 baud
  23.     send %CR & %CR;
  24.  
  25. Wait_SprintNet:
  26.  
  27.     if Attempts = 0 goto SprintNet_Failed;
  28.  
  29.     Attempts = Attempts - 1;
  30.  
  31.     wait
  32.         "Terminal" goto send_telenet_id,
  33.         "@" goto send_telenet_host
  34.     until 85;
  35.  
  36.     send %CR & %CR;
  37.     goto Wait_SprintNet;
  38.  
  39. send_telenet_id:
  40.  
  41.     send "D1" & %CR;
  42.     goto Wait_SprintNet;
  43.  
  44. send_telenet_host:
  45.  
  46.     send "C 202201" & %CR;
  47.     exit %Success;
  48.  
  49. SprintNet_Failed:
  50.     define %FailureMsg = "SprintNet: no answer";
  51.     exit %Failure;
  52.     
  53. SprintNet_Cancelled:
  54.     exit %Cancel;
  55.     
  56.  
  57.