home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1996 May / buyer-0596.iso / wincim / scripts.lib / DATEXJ.SCR < prev    next >
Text File  |  1995-12-05  |  2KB  |  79 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-J (BTX):
  9. !    Success:  returns %Success
  10. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  11. !
  12. !+V
  13. ! "3.8.1"
  14. !-V
  15.  
  16. Tries = 5;
  17. count = 0;
  18. Second_Time = %FALSE;
  19. on cancel goto Return_Cancel;
  20. show "Connecting to Datex-J";
  21.  
  22. Wait_DatexJ:
  23.     if Tries = 0 goto DatexJ_Failure;
  24.     Tries = Tries - 1;
  25.     wait
  26.         "^@"        goto Send_Response,
  27.         "^E"        goto Send_Response,
  28.         "kennung"    goto Send_Kennung,
  29.         %mdm_Failure    goto DatexJ_Failure
  30.     until 200;
  31.  
  32.     goto Wait_DatexJ;
  33.  
  34. Send_Response: 
  35.     send "." & %CR;
  36. Send_Kennung:
  37.     wait until 100;
  38.     send "000255975978";
  39.     show "Sending Datex-J User ID";
  40. Send_CR:
  41.     count = 0;
  42.     wait 
  43.         "DM"        goto Send_Pound,
  44.         "Host Name:"    goto Match_Host_Name
  45.     until 300;
  46.  
  47.     if Second_Time = %TRUE goto DatexJ_Failure;
  48.  
  49. Send_Pound:
  50.     wait
  51.         %mdm_Failure    goto DatexJ_Failure,
  52.         "User ID:"    goto Match_Host_Name,
  53.         "Host Name:"    goto Match_Host_Name
  54.     until 10;
  55.  
  56.     send %CR;
  57.     count = count + 1;
  58.     if count < 3 goto Send_Pound;
  59.  
  60.     Second_Time = %TRUE;
  61.     goto Send_CR;
  62.  
  63. DatexJ_Failure:
  64.     define %FailureMsg = "Datex-J not responding";
  65.     exit %Failure;
  66.  
  67. Return_Cancel:
  68.     exit %Cancel;
  69.  
  70. Match_Host_Name:
  71.     wait
  72.         "Host Name:"    goto Match_Host_Name
  73.     until 10;
  74.  
  75. Return_Success:
  76.     send %CR;
  77.     wait until 10;
  78.     exit %Success;
  79.