home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1997 October / DPCB1097.iso / internet / CSI303UK / SCRIPTS.LIB / FTCONN.SCR < prev    next >
Text File  |  1997-02-03  |  1KB  |  66 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. !  FT-Connect:
  9. !       Connect to France Telecom
  10. !       Success:  returns %Success
  11. !       Failure:  saves error msg in %FailureMsg and returns %Failure
  12. !
  13. !+V
  14. ! "4.0"
  15. !-V
  16.  
  17. CompuServe_NUA = "196282595";
  18. Tries = 5;
  19. twice_tried = %FALSE;
  20. on cancel goto Return_Cancel;
  21.  
  22. show "Connecting to FT-Connect";
  23.  
  24.  
  25. Wait_FTConnect:
  26.     if Tries = 0 goto FTConnect_Failure;
  27.     Tries = Tries - 1;
  28.     if (Tries = 4) goto Send_Address; ! First time
  29.     wait
  30.         "France"        goto Send_Address,
  31.         "TRANSPAC"      goto Send_Address,
  32.         "ERROR"         goto Resend_Address,
  33.         "LIB"           goto Resend_Address,
  34.         "CLR"           goto Resend_Address,
  35.         %mdm_Failure    goto FTConnect_Failure,
  36.         "COM"           goto Return_Success
  37.     until 80;
  38.  
  39.     send %CR;
  40.     goto Send_Address;
  41.     
  42. Resend_Address:
  43.     if twice_tried = %TRUE goto Cserve_NUA_Failure;
  44.     twice_tried = %TRUE;
  45.  
  46. Send_Address:
  47.     show "Sending CompuServe NUA...";
  48.     send CompuServe_NUA & %CR;
  49.     goto Wait_FTConnect;
  50.  
  51. FTConnect_Failure:
  52.     define %FailureMsg = "FT-Connect not responding";
  53.     goto Return_Failure;
  54.  
  55. Cserve_NUA_Failure:
  56.     define %FailureMsg = "FT-Connect not accepting CompuServe NUA";
  57.  
  58. Return_Failure:
  59.     exit %Failure;
  60.  
  61. Return_Cancel:
  62.     exit %Cancel;
  63.  
  64. Return_Success:
  65.     exit %Success;
  66.