home *** CD-ROM | disk | FTP | other *** search
/ PC Direkt 1995 #3 / PCD_395.iso / kommunik / wincim_d / disk1 / scripts.lib / INFONET.SCR < prev    next >
Encoding:
Text File  |  1994-04-14  |  3.0 KB  |  122 lines

  1. !
  2. !  Copyright (c) 1993
  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. !  InfoNet:
  9. !    Connect to InfoNet or InfoNet-Europe.  Arg1 contains TRUE if
  10. !    connect is to InfoNet-Europe and FALSE otherwise.
  11. !    Success:  returns %Success
  12. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  13. !    Arg1: 0 - InfoNet World, 1 - InfoNet Europe, 2 - Infonet Korea,
  14. !        3 - InfoNet Taiwan, 4 - InfoNet Mexico, 5 - InfoNet S. Africa
  15. !+V
  16. ! "3.4.1"
  17. !-V
  18.  
  19. Which_InfoNet = Arg1;
  20. if Which_InfoNet = 1 goto Init_Europe;
  21. if Which_InfoNet = 2 goto Init_Korea;
  22. if Which_InfoNet = 3 goto Init_Taiwan;
  23. if Which_InfoNet = 4 goto Init_Mexico;
  24. if Which_InfoNet = 5 goto Init_SAfrica;
  25.  
  26. show "Verbindungsaufbau mit dem InfoNet-World";
  27. FailStr = "InfoNet-World antwortet nicht";
  28. FailStr2 = "InfoNet-World antwortet nicht";
  29. goto Init_Common;
  30.  
  31. Init_Europe:
  32.     show "Verbindungsaufbau mit dem InfoNet-Euro";
  33.     FailStr = "InfoNet-Euro antwortet nicht";
  34.     FailStr2 = "InfoNet-Euro antwortet nicht";
  35.     goto Init_Common;
  36.  
  37. Init_Korea:
  38.     show "Verbindungsaufbau mit dem InfoNet-Korea";
  39.     FailStr = "InfoNet-Korea antwortet nicht";
  40.     FailStr2 = "InfoNet-Korea antwortet nicht";
  41.     goto Init_Common;
  42.  
  43. Init_Taiwan:
  44.     show "Verbindungsaufbau mit dem InfoNet-Taiwan";
  45.     FailStr = "InfoNet-Taiwan antwortet nicht";
  46.     FailStr2 = "InfoNet-Taiwan antwortet nicht";
  47.     goto Init_Common;
  48.  
  49. Init_Mexico:
  50.     show "Verbindungsaufbau mit dem InfoNet-Mexico";
  51.     FailStr = "InfoNet-Mexico antwortet nicht";
  52.     FailStr2 = "InfoNet-Mexico antwortet nicht";
  53.     goto Init_Common;
  54.  
  55. Init_SAfrica:
  56.     show "Verbindungsaufbau mit dem InfoNet-South Africa";
  57.     FailStr = "InfoNet-South Africa antwortet nicht";
  58.     FailStr2 = "InfoNet-South Africa antwortet nicht";
  59.     ! fall through
  60.  
  61. Init_Common:
  62.     Tries = 5;
  63.     Timeout = 10;
  64.     Got_Center = %FALSE;
  65.     on cancel goto Return_Cancel;
  66.  
  67. Wait_InfoNet:
  68.     wait
  69.         "#"        goto Send_Response,
  70.         "Center"    goto Send_InfoNet_Host,
  71.         "Centre"    goto Send_InfoNet_Host,
  72.         "COMMUNICATION" goto Return_Success
  73.     until Timeout;
  74.  
  75.     Timeout = 50;
  76.     if Tries = 0 goto InfoNet_Failure;
  77.  
  78.     Tries = Tries - 1;
  79.     send %CR & %CR & %CR;
  80.     goto Wait_InfoNet;
  81.  
  82. Send_Response:
  83.     if Got_Center goto Wait_InfoNet;
  84.     send "C" & %CR;
  85.     Timeout = 195;
  86.     goto Wait_InfoNet;
  87.  
  88. Send_InfoNet_Host:
  89.     show "CompuServe-Adresse wird ⁿbertragen...";
  90.     if Which_InfoNet = 0 goto Send_InfoNet_World_Host;
  91.     if Which_InfoNet = 1 goto Send_InfoNet_Europe_Host;
  92.  
  93.     send "CPS" & %CR;
  94.     goto Finish_Send_Host;
  95.  
  96. Send_InfoNet_World_Host:
  97.     send "CSI" & %CR;
  98.     goto Finish_Send_Host;
  99.  
  100. Send_InfoNet_Europe_Host:
  101.     send "CSF" & %CR;
  102.     goto Finish_Send_Host;
  103.  
  104. Finish_Send_Host:
  105.     FailStr = FailStr2;
  106.     if Tries = 0 goto InfoNet_Failure;
  107.  
  108.     Tries = Tries - 1;
  109.     Got_Center = %TRUE;
  110.     Timeout = 835;
  111.     goto Wait_InfoNet;
  112.  
  113. InfoNet_Failure:
  114.     define %FailureMsg = FailStr;
  115.     exit %Failure;
  116.  
  117. Return_Cancel:
  118.     exit %Cancel;
  119.  
  120. Return_Success:
  121.     exit %Success;
  122.