home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1996 May / buyer-0596.iso / wincim / scripts.lib / CSIRNET.SCR < prev    next >
Text File  |  1995-12-05  |  2KB  |  87 lines

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