home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1996 May / buyer-0596.iso / wincim / scripts.lib / TELEPAC.SCR < prev    next >
Text File  |  1995-12-05  |  1KB  |  55 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. !  TELEPAC:
  9. !    Connect to Telepac
  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. show "Connecting to TELEPAC";
  18. Tries = 5;
  19. HostSent = %FALSE;
  20. on cancel goto Return_Cancel;
  21.  
  22. Wait_Telepac:
  23.     if Tries = 0 goto Telepac_Failure;
  24.     Tries = Tries - 1;
  25.  
  26.     wait
  27.         "Telepac: "    goto Send_Telepac_Host,
  28.         "User ID:"    goto Return_Success,
  29.         "Host Name:"    goto Return_Success
  30.     until 60;
  31.  
  32.     send "." & %CR;
  33.     HostSent = %FALSE;
  34.     goto Wait_Telepac;
  35.  
  36. Send_Telepac_Host:
  37.     if HostSent goto Wait_Telepac;
  38.  
  39.     wait until 5;
  40.     send "R 47911303" & %CR;
  41.     wait until 10;
  42.     HostSent = %TRUE;
  43.     goto Wait_Telepac;
  44.  
  45. Telepac_Failure:
  46.     define %FailureMsg = "TELEPAC not responding";
  47.     exit %Failure;
  48.  
  49. Return_Cancel:
  50.     exit %Cancel;
  51.  
  52. Return_Success:
  53.     send %CR;
  54.     exit %Success;
  55.