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 / CSIRNET.SCR < prev    next >
Text File  |  1992-12-30  |  3KB  |  84 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. !  CSIR-Net Script:                                                   !
  10. !     Connect to CSIR-Net                                             !
  11. !     Success:  returns %Success                                      !
  12. !     Failure:  saves error msg in %FailureMsg and returns %Failure   !
  13. !                                                                     !
  14. !  $Revision:   1.0                                                   !
  15. !                                                                     !
  16. !---------------------------------------------------------------------!
  17.  
  18. CSIRnet_ID = "901040oz3u";
  19. CIS_Address = "C10634679";
  20.  
  21. NUI_Tries = 5;
  22. Tries = 2;
  23. on cancel goto Return_Cancel;
  24. show "Connecting to CSIR-Net";
  25. wait until 50;
  26.  
  27. Wait_NUI:
  28.  
  29.     if NUI_Tries = 0 goto CSIRnet_Failure;
  30.     NUI_Tries = NUI_Tries - 1;
  31.     send "X.28" & %CR;
  32.  
  33.     wait
  34.         "NUI?"  goto send_CSIRnet_password,
  35.         "NO CARRIER" goto CSIRnet_Logon_Failure
  36.     until 100;
  37.  
  38.     goto Wait_NUI;
  39.  
  40. send_CSIRnet_password:
  41.  
  42.     send CSIRnet_ID;
  43.     show "Waiting for TRIPLE-X ...";
  44.  
  45. Wait_CSIRnet:
  46.  
  47.     if Tries = 0 goto CSIRnet_Logon_Failure;
  48.     Tries = Tries - 1;
  49.  
  50.     wait
  51.         "NUI?"  goto send_CSIRnet_password,
  52.         "SELECT ?"  goto send_A,
  53.         "FOR MAIN INDEX"  goto send_CIS_Address,
  54.         "NO CIRCUIT"  goto send_CIS_Address,
  55.         "NO CARRIER"  goto CSIRnet_Logon_Failure
  56.     until 350;
  57.  
  58.     send %CR;
  59.     goto Wait_CSIRnet;
  60.  
  61. send_A:
  62.     send "A";
  63.     goto Wait_CSIRnet;
  64.  
  65. send_CIS_Address:
  66.     show "Sending CompuServe Address ...";
  67.     wait until 15;
  68.     send CIS_Address & %CR;
  69.     goto Return_Success;
  70.  
  71. CSIRnet_Failure:
  72.     define %FailureMsg = "CSIR-Net: No Response to X.28";
  73.     exit %Failure;
  74.  
  75. CSIRnet_Logon_Failure:
  76.     define %FailureMsg = "CSIR-Net: Logon Failure";
  77.     exit %Failure;
  78.  
  79. Return_Cancel:
  80.     exit %Cancel;
  81.  
  82. Return_Success:
  83.     exit %Success;
  84.