home *** CD-ROM | disk | FTP | other *** search
/ PowerPlay 1998 July / PowerPlay0798.bin / Online / Cserve / SCRIPTS.LIB / datexj.scr < prev    next >
Text File  |  1997-08-12  |  2KB  |  113 lines

  1. !
  2. !  Copyright (c) 1997
  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. !  modified by Axel Pipahl, CompuServe Munich for direct CompuServe access
  13. !
  14. !+V
  15. ! "4.0.2D-Memphis"
  16. !-V
  17.  
  18. Tries = 5;
  19. count = 6;
  20. Second_Time = %FALSE;
  21. on cancel goto Return_Cancel;
  22. show "Verbindungsaufbau mit Datex-J";
  23.  
  24. Resend_Response:
  25.     wait until 10;
  26.     send "." & %CR; 
  27.  
  28. Wait_DatexJ:
  29.     if Tries = 0 goto DatexJ_Failure;
  30.     Tries = Tries - 1;
  31.     wait
  32.  
  33.         "000000"        goto Send_Kennung,
  34.         "Host Name:"    goto Match_Host_Name,
  35.         "User ID:"      goto Match_Host_Name,
  36.         %mdm_Failure    goto DatexJ_Failure
  37.     until 100;
  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 "000327278259";
  51.     show "Datex-J Teilnehmernummer wird ⁿbertragen";
  52.  
  53.  
  54. Wait_Connect:
  55.     if count = 0 goto DatexJ_Failure;
  56.     count = count - 1;
  57.     wait    
  58.         "sicht"         goto Send_CR,
  59.         "aufbau mit"    goto Send_CR,
  60.         "gabeseite"     goto Send_11,
  61.         "Host Name:"    goto Match_Host_Name,
  62.         "User ID:"      goto Match_Host_Name,
  63.         %mdm_Failure    goto DatexJ_Failure
  64.  
  65.     until 300;
  66.     
  67.     if Second_Time = %TRUE goto Send_11;
  68.     Second_Time = %TRUE;
  69.     goto Send_CR;
  70.  
  71.  
  72. Send_CR:
  73.     wait
  74.         %mdm_Failure    goto DatexJ_Failure,
  75.         "User ID:"      goto Match_Host_Name,
  76.         "Host Name:"    goto Match_Host_Name
  77.     until 10;
  78.     
  79.     send %CR;
  80.  
  81.     goto Wait_Connect;
  82.  
  83.  
  84. Send_11:
  85.     wait
  86.         %mdm_Failure    goto DatexJ_Failure,
  87.         "User ID:"      goto Match_Host_Name,
  88.         "Host Name:"    goto Match_Host_Name
  89.     until 10;
  90.     
  91.     Second_Time = %FALSE;
  92.     send "11";
  93.  
  94.     goto Wait_Connect;
  95.  
  96.  
  97. DatexJ_Failure:
  98.     define %FailureMsg = "Datex-J antwortet nicht";
  99.     exit %Failure;
  100.  
  101. Return_Cancel:
  102.     exit %Cancel;
  103.  
  104. Match_Host_Name:
  105.     wait
  106.         "Host Name:"    goto Match_Host_Name
  107.     until 10;
  108.  
  109. Return_Success:
  110.     send %CR;
  111.     wait until 10;
  112.     exit %Success;
  113.