home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / n / newscr.zip / NEWSCR.EXE / DATEXP.SCR < prev    next >
Text File  |  1992-12-09  |  2KB  |  60 lines

  1. !---------------------------------------------------------------------!
  2. !                                                                     !
  3. !  Copyright (c) 1991                                                 !  
  4. !  by CompuServe Incorporated, Columbus, Ohio                         !
  5. !                                                                     !
  6. !  The information in this software is subject to change without      !
  7. !  notice and should not be construed as a commitment by CompuServe.  !
  8. !                                                                     !
  9. !  DATEX Script:                                                      !    
  10. !     Connect to Datex-P                                              !
  11. !     Success:  returns %Success                                      !
  12. !     Failure:  saves error msg in %FailureMsg and returns %Failure   !
  13. !                                                                     !
  14. !     $Revision::   1.1      $                                        !
  15. !                                                                     !
  16. !---------------------------------------------------------------------!
  17.  
  18. show "Connecting to Datex-P";
  19. Tries = 5;
  20. on cancel goto Return_Cancel;
  21.  
  22. Wait_Datex:
  23.  
  24.     if Tries = 0 goto Datex_Failure;
  25.     Tries = Tries - 1;
  26.     
  27.     wait until 15;
  28.     send ".";
  29.     wait until 15;
  30.     send %CR;
  31.     
  32.     wait
  33.     "DATEX-P:"              goto Send_Datex_Host
  34.     until 30;
  35.  
  36.     goto Wait_Datex;
  37.  
  38. Send_Datex_Host:
  39.  
  40.     wait until 15;    
  41.     send "R 4569002330" & %CR; 
  42.  
  43.     wait
  44.     "User ID:"              goto Return_Success,
  45.     "Host Name:"            goto Return_Success
  46.     until 150;
  47.  
  48.     goto Wait_Datex;
  49.  
  50. Datex_Failure:
  51.     define %FailureMsg = "Datex-P not responding";
  52.     exit %Failure;
  53.  
  54. Return_Cancel:
  55.     exit %Cancel;
  56.  
  57. Return_Success:
  58.     exit %Success;
  59.  
  60.