home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1996 May / buyer-0596.iso / wincim / scripts.lib / TYMNET.SCR < prev   
Text File  |  1995-12-05  |  2KB  |  88 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. !  TYMNET:
  9. !    Connect to Tymnet
  10. !    Success:  returns %Success
  11. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  12. !
  13. !    Which_Tymnet:  Tymnet = 1, AlaskaNet = 2, PacNet = 3
  14. !
  15. !+V
  16. ! "3.8.1"
  17. !-V
  18.  
  19. A_Sent = %FALSE;
  20. CR_Sent = %FALSE;
  21. Host_Name = "CPS";
  22.  
  23. on cancel goto Return_Cancel;
  24. Which_Tymnet = Arg1;
  25. if Which_Tymnet = 2 goto Show_AlaskaNet;
  26. if Which_Tymnet = 3 goto Show_PacNet;
  27.  
  28. show "Connecting to TYMNET";
  29. goto Wait_Tymnet;
  30.  
  31. Show_AlaskaNet:
  32.     Host_Name = "CNS";
  33.     show "Connecting to AlaskaNet";
  34.     goto Wait_Tymnet;
  35.  
  36. Show_PacNet:
  37.     Host_Name = "CNSG";
  38.     show "Connecting to PacNet";
  39.  
  40. Wait_Tymnet:
  41.     wait
  42.         "Please "    goto Send_A,
  43.         "xxx"        goto Send_A,
  44.         "log in:"    goto Send_Tymnet_Host,
  45.         "User Name"    goto Send_Tymnet_Host,
  46.         "COMPUSERVE"    goto Return_Success,
  47.         "User ID:"    goto Return_Success
  48.     until 85;
  49.  
  50.     if not CR_Sent goto Send_CR;
  51.     if not A_Sent goto Send_A;
  52.     goto Tymnet_Failure;
  53.     
  54. Send_CR:
  55.     send %CR & %CR;
  56.     CR_Sent = %TRUE;
  57.     goto Wait_Tymnet;
  58.  
  59. Send_A:
  60.     if A_Sent goto Wait_Tymnet;
  61.     send "A";
  62.     A_Sent = %TRUE;
  63.     goto Wait_Tymnet;
  64.  
  65. Send_Tymnet_Host:
  66.     send Host_Name & %CR;
  67.     goto Wait_Tymnet;
  68.  
  69. Tymnet_Failure:
  70.     if Which_Tymnet = 2 goto AlaskaNet_Failure;
  71.     if Which_Tymnet = 3 goto PacNet_Failure;
  72.     define %FailureMsg = "Tymnet: No answer";
  73.     exit %Failure;
  74.  
  75. AlaskaNet_Failure:
  76.     define %FailureMsg = "AlaskaNet: No answer";
  77.     exit %Failure;
  78.  
  79. PacNet_Failure:
  80.     define %FailureMsg = "PacNet: No answer";
  81.     exit %Failure;
  82.  
  83. Return_Cancel:
  84.     exit %Cancel;
  85.  
  86. Return_Success:
  87.     exit %Success;
  88.