home *** CD-ROM | disk | FTP | other *** search
/ Key Multimedia Greetings / Key_Multimedia_Greetings_SoftKey_1997.iso / compsrv / scripts.lib / DATEXJ.SCR < prev    next >
Text File  |  1996-09-23  |  2KB  |  92 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. !  Datex-J (BTX):
  9. !    Success:  returns %Success
  10. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  11. !
  12. !+V
  13. ! "3.9.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. Resend_Response:
  23.     wait until 10;
  24.     send "." & %CR;
  25.  
  26. Wait_DatexJ:
  27.     if Tries = 0 goto DatexJ_Failure;
  28.     Tries = Tries - 1;
  29.     wait
  30.         "^@"        goto Send_Response,
  31.         "^E"        goto Send_Response,
  32.         "CET"        goto Send_Response,
  33.         "AA"        goto Send_Response,
  34.         "000000"    goto Send_Kennung,
  35.  
  36.         %mdm_Failure    goto DatexJ_Failure
  37.     until 200;
  38.  
  39. Send_Response: 
  40.     wait until 10;
  41.     send "." & %CR;
  42.  
  43. Wait_Kennung:
  44.     wait
  45.         "000000"    goto Send_Kennung
  46.     until 200;
  47.  
  48. Send_Kennung:
  49.     wait until 10;
  50.     send "000255975978";
  51.     show "Sending Datex-J User ID";
  52.  
  53. Send_CR:
  54.     count = 0;
  55.     wait 
  56.         "DM"        goto Send_Pound,
  57.         "Host Name:"    goto Match_Host_Name
  58.     until 300;
  59.  
  60.     if Second_Time = %TRUE goto DatexJ_Failure;
  61.  
  62. Send_Pound:
  63.     wait
  64.         %mdm_Failure    goto DatexJ_Failure,
  65.         "User ID:"    goto Match_Host_Name,
  66.         "Host Name:"    goto Match_Host_Name
  67.     until 10;
  68.  
  69.     send %CR;
  70.     count = count + 1;
  71.     if count < 3 goto Send_Pound;
  72.  
  73.     Second_Time = %TRUE;
  74.     goto Send_CR;
  75.  
  76. DatexJ_Failure:
  77.     define %FailureMsg = "Datex-J not responding";
  78.     exit %Failure;
  79.  
  80. Return_Cancel:
  81.     exit %Cancel;
  82.  
  83. Match_Host_Name:
  84.     wait
  85.         "Host Name:"    goto Match_Host_Name
  86.     until 10;
  87.  
  88. Return_Success:
  89.     send %CR;
  90.     wait until 10;
  91.     exit %Success;
  92.