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 / TELEPAC.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. !  TELEPAC Script:                                                    !
  10. !     Connect to Telepac                                              !
  11. !     Success:  returns %Success                                      !
  12. !     Failure:  saves error msg in %FailureMsg and returns %Failure   !
  13. !                                                                     !
  14. !     $Revision::   1.5      $                                        !
  15. !                                                                     !
  16. !---------------------------------------------------------------------!
  17.  
  18. show "Connecting to TELEPAC";
  19. Tries = 5;
  20. HostSent = %FALSE;
  21. on cancel goto Return_Cancel;
  22.  
  23. Wait_Telepac:
  24.  
  25.     if Tries = 0 goto Telepac_Failure;
  26.     Tries = Tries - 1;
  27.  
  28.     wait
  29.         "Telepac: "    goto Send_Telepac_Host,
  30.         "User ID:"     goto Return_Success,
  31.         "Host Name:"   goto Return_Success
  32.     until 30;
  33.  
  34.     send "." & %CR;
  35.     HostSent = %FALSE;
  36.     goto Wait_Telepac;
  37.  
  38. Send_Telepac_Host:
  39.  
  40.     if HostSent goto Wait_Telepac;
  41.  
  42.     wait until 5;
  43.     send "R 47911303" & %CR;
  44.     wait until 10;
  45.     HostSent = %TRUE;
  46.     goto Wait_Telepac;
  47.  
  48. Telepac_Failure:
  49.     define %FailureMsg = "TELEPAC not responding";
  50.     exit %Failure;
  51.  
  52. Return_Cancel:
  53.     exit %Cancel;
  54.  
  55. Return_Success:
  56.     exit %Success;
  57.