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 / TRANSPAC.SCR < prev    next >
Text File  |  1993-01-11  |  2KB  |  70 lines

  1. !---------------------------------------------------------------------!
  2. !                                                                     !
  3. !  Copyright (c) 1993                                                 !
  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. !  Transpac SCRIPT:                                                   !
  10. !     Connect to Transpac                                             !
  11. !     Success:  returns %Success                                      !
  12. !     Failure:  saves error msg in %FailureMsg and returns %Failure   !
  13. !                                                                     !
  14. !     $Revision::   1.0      $                                        !
  15. !                                                                     !
  16. !---------------------------------------------------------------------!
  17.  
  18. CompuServe_NUA = "19628030";
  19. Tries = 5;
  20. twice_tried = %FALSE;
  21. on cancel goto Return_Cancel;
  22.  
  23. show "Connecting to Transpac";
  24. wait until 20;
  25. send %CR;
  26.  
  27. Wait_Transpac:
  28.  
  29.     if Tries = 0 goto Transpac_Failure;
  30.     Tries = Tries - 1;
  31.  
  32.     wait
  33.         "TRANSPAC" goto Send_Address,
  34.         "ERROR" goto Resend_Address,
  35.         "LIB" goto Resend_Address,
  36.         "NO CARRIER" goto Transpac_Failure,
  37.         "COM" goto Return_Success
  38.     until 80;
  39.  
  40.     send %CR;
  41.     goto Wait_Transpac;
  42.  
  43. Resend_Address:
  44.     if twice_tried = %TRUE goto Cserve_NUA_Failure;
  45.     twice_tried = %TRUE;
  46.  
  47. Send_Address:
  48.     wait until 20;
  49.     show "Sending CompuServe NUA ...";
  50.     send CompuServe_NUA & %CR;
  51.     goto Wait_Transpac;
  52.  
  53. Transpac_Failure:
  54.     define %FailureMsg = "Transpac not responding";
  55.     goto Return_Failure;
  56.  
  57. Cserve_NUA_Failure:
  58.     define %FailureMsg = "Transpac not accepting CompuServe NUA";
  59.  
  60. Return_Failure:
  61.     exit %Failure;
  62.  
  63. Return_Cancel:
  64.     exit %Cancel;
  65.  
  66. Return_Success:
  67.     exit %Success;
  68.  
  69.  
  70.