home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1996 May / buyer-0596.iso / wincim / scripts.lib / DATEXP.SCR < prev    next >
Text File  |  1995-12-05  |  1KB  |  62 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. !  DATEX:
  9. !    Connect to Datex-P
  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. show "Connecting to Datex-P";
  18. Tries = 5;
  19. on cancel goto Return_Cancel;
  20. FailStr = "Datex-P not responding";
  21.  
  22. Wait_Datex:
  23.     if Tries = 0 goto Datex_Failure;
  24.     Tries = Tries - 1;
  25.     
  26.     wait until 15;
  27.     send ".";
  28.     wait until 15;
  29.     send %CR;
  30.     
  31.     wait
  32.         %mdm_Failure    goto NO_Carrier,
  33.         "DATEX-P:"    goto Send_Datex_Host
  34.     until 30;
  35.  
  36.     goto Wait_Datex;
  37.  
  38. Send_Datex_Host:
  39.     wait until 15;    
  40.     send "R 4569002330" & %CR; 
  41.  
  42.     wait
  43.         %mdm_Failure    goto NO_Carrier,
  44.         "User ID:"    goto Return_Success,
  45.         "Host Name:"    goto Return_Success
  46.     until 150;
  47.  
  48.     goto Wait_Datex;
  49.  
  50. NO_Carrier:
  51.     FailStr = "Modem connection lost";
  52. Datex_Failure:
  53.     define %FailureMsg = FailStr;
  54.     exit %Failure;
  55.  
  56. Return_Cancel:
  57.     exit %Cancel;
  58.  
  59. Return_Success:
  60.     send %CR;
  61.     exit %Success;
  62.