home *** CD-ROM | disk | FTP | other *** search
/ Key Multimedia Greetings / Key_Multimedia_Greetings_SoftKey_1997.iso / compsrv / scripts.lib / LATA.SCR < prev    next >
Text File  |  1996-09-23  |  1KB  |  74 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. !  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.9.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_LATA2;
  53.  
  54. Wait_LATA2:
  55.     wait
  56.         "*"        goto Send_LATA_Host,
  57.         "COM"        goto Return_Success,
  58.         "Err"        goto Send_LATA_Host,
  59.         "Host Name"    goto Return_Success,
  60.         %mdm_Failure    goto LATA_Failure
  61.  
  62.     until 80;
  63.  
  64.  
  65. LATA_Failure:
  66.     define %FailureMsg = "LATA not responding";
  67.     exit %Failure;
  68.  
  69. Return_Cancel:
  70.     exit %Cancel;
  71.  
  72. Return_Success:
  73.     exit %Success;
  74.