home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1996 May / buyer-0596.iso / wincim / scripts.lib / LATA.SCR < prev    next >
Text File  |  1995-12-05  |  1KB  |  63 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. !  LATA:
  9. !    Connect to LATA
  10. !    Success:  returns %Success
  11. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  12. !    Arg1 = False if Network setting is LATA-Ct, True if LATA
  13. !
  14. !+V
  15. ! "3.8.1"
  16. !-V
  17.  
  18. show "Connecting to LATA";
  19. Tries = 5;
  20. on cancel goto Return_Cancel;
  21.  
  22. Response_Char = ".";
  23. if Arg1 = %TRUE goto Send_Response;
  24.  
  25. Response_Char = "H";    ! Ct. LATA selected
  26.  
  27. Send_Response:
  28.     if Tries = 0 goto LATA_Failure;
  29.     Tries = Tries - 1;
  30.  
  31.     wait until 5;
  32.     send Response_Char;
  33.     wait until 2;
  34.     send Response_Char;
  35.     wait until 2;
  36.     send Response_Char;
  37.     wait until 2;
  38.     send %CR;
  39.  
  40. Wait_LATA:
  41.     wait
  42.         "*"        goto Send_LATA_Host,
  43.         "COM^M"        goto Return_Success,
  44.         "Err"        goto Send_LATA_Host,
  45.         %mdm_Failure    goto LATA_Failure
  46.     until 70;
  47.  
  48.     goto Send_Response;
  49.  
  50. Send_LATA_Host:
  51.     send ".CPS" & %CR;
  52.     goto Wait_LATA;
  53.  
  54. LATA_Failure:
  55.     define %FailureMsg = "LATA not responding";
  56.     exit %Failure;
  57.  
  58. Return_Cancel:
  59.     exit %Cancel;
  60.  
  61. Return_Success:
  62.     exit %Success;
  63.