home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1998 May / dpcb0598.iso / Internet / Compu / CSI304UK / SCRIPTS.LIB / ARGNET.SCR next >
Text File  |  1997-07-08  |  2KB  |  67 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. !  CPS_ARG:
  9. !    Connect to CPS_ARG
  10. !    Success:  returns %Success
  11. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  12. !
  13. !+V
  14. ! "4.0.2"
  15. !-V
  16.  
  17. show "Connecting to CompuServe Argentina";
  18. Tries = 5;
  19. on cancel goto Return_Cancel;
  20. FailStr = "CompuServe Argentina not responding";
  21.  
  22. Wait_CPS_ARG:
  23.     if Tries = 0 goto CPS_ARG_Failure;
  24.     
  25.     
  26.     wait
  27.                 %mdm_Failure            goto NO_Carrier,
  28.                 "% Connection Refused"  goto CPS_ARG_Failure,
  29.                 "Username:"             goto Send_CPS_ARG_Host,
  30.                 "gw-1"                  goto send_access,
  31.                 "Password:"             goto send_Password,
  32.                 "User ID:"              goto Return_Success,
  33.                 "Host Name:"            goto Return_Success
  34.     until 150;
  35.     
  36.     send %CR;
  37.     Tries = Tries - 1;
  38.     goto Wait_CPS_ARG;
  39.  
  40. Send_CPS_ARG_Host:
  41.     wait until 15;    
  42.         send "cps" & %CR; 
  43.     goto Wait_CPS_ARG;
  44.  
  45. send_access:
  46.     wait until 15;    
  47.     send "cps-test" & %CR; 
  48.     goto Wait_CPS_ARG;
  49.  
  50. send_Password:
  51.     wait until 15;    
  52.         send "cis" & %CR; 
  53.     goto Wait_CPS_ARG;
  54.  
  55. NO_Carrier:
  56.         FailStr = "Modem connection lost";
  57. CPS_ARG_Failure:
  58.     define %FailureMsg = FailStr;
  59.     exit %Failure;
  60.  
  61. Return_Cancel:
  62.     exit %Cancel;
  63.  
  64. Return_Success:
  65.     send %CR;
  66.     exit %Success;
  67.