home *** CD-ROM | disk | FTP | other *** search
/ 100 Great Kid's Games 1 / 100_KIDS_GA.ISO / compsrv / scripts.lib / TELENET.SCR < prev    next >
Text File  |  1995-12-05  |  1KB  |  50 lines

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