home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1997 December / dpcb1297.iso / Internet / CSI26UK / SCRIPTS.LIB / ARGNET.SCR next >
Text File  |  1996-09-23  |  2KB  |  67 lines

  1. !
  2. !  Copyright (c) 1996
  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. ! "3.9.1"
  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.         wait until 10;
  26.     
  27.     wait
  28.                 %mdm_Failure            goto NO_Carrier,
  29.                 "% Connection Refused"  goto CPS_ARG_Failure,
  30.                 "Username:"             goto Send_CPS_ARG_Host,
  31.                 "gw-1"                  goto send_access,
  32.                 "Password:"             goto send_Password,
  33.                 "User ID:"              goto Return_Success,
  34.                 "Host Name:"            goto Return_Success
  35.     until 150;
  36.  
  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 "" & %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.