home *** CD-ROM | disk | FTP | other *** search
/ 3,500 Cliparts Vectoriels 2 / 3500_V2.iso / compu / csi302f / scripts.lib / transpac.scr < prev    next >
Text File  |  1997-01-30  |  1KB  |  64 lines

  1. !
  2. !  Copyright (c) 1997
  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. !  Transpac:
  9. !   Connect to Transpac
  10. !   Success:  returns %Success
  11. !   Failure:  saves error msg in %FailureMsg and returns %Failure
  12. !
  13. !+V
  14. ! "3.8.3F"
  15. !-V
  16.  
  17. CompuServe_NUA = "19628030";
  18. Tries = 5;
  19. twice_tried = %FALSE;
  20. on cancel goto Return_Cancel;
  21.  
  22. show "Connexion α Transpac";
  23.  
  24. Wait_Transpac:
  25.     if Tries = 0 goto Transpac_Failure;
  26.     Tries = Tries - 1;
  27.         if Tries = 4 goto Send_Address; ! First time through, blind send
  28.  
  29.     wait
  30.         "TRANSPAC"  goto Send_Address,
  31.         "ERROR"     goto Resend_Address,
  32.         "CLR"       goto Resend_Address,
  33.         %mdm_Failure    goto Transpac_Failure,
  34.         "COM"       goto Return_Success
  35.     until 80;
  36.  
  37.     send %CR;
  38.         goto Send_Address;
  39.                                   
  40. Resend_Address:
  41.     if twice_tried = %TRUE goto Cserve_NUA_Failure;
  42.     twice_tried = %TRUE;
  43.  
  44. Send_Address:
  45.     show "Envoi du NUA de CompuServe...";
  46.     send CompuServe_NUA & %CR;
  47.     goto Wait_Transpac;
  48.  
  49. Transpac_Failure:
  50.     define %FailureMsg = "Transpac ne rΘpond pas";
  51.     goto Return_Failure;
  52.  
  53. Cserve_NUA_Failure:
  54.     define %FailureMsg = "Transpac n'accepte pas le NUA de CompuServe";
  55.  
  56. Return_Failure:
  57.     exit %Failure;
  58.  
  59. Return_Cancel:
  60.     exit %Cancel;
  61.  
  62. Return_Success:
  63.     exit %Success;
  64.