home *** CD-ROM | disk | FTP | other *** search
/ Billboard Music Guide 1995 / BillboardMusicGuide1_2.iso / spry / scripts.lib / TYMNET.SCR < prev   
Text File  |  1994-12-29  |  2KB  |  90 lines

  1. !
  2. !  Copyright (c) 1994
  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.5.2"
  17. !-V
  18.  
  19. A_Sent = %FALSE;
  20. CR_Sent = %FALSE;
  21.  
  22. on cancel goto Return_Cancel;
  23. Which_Tymnet = Arg1;
  24. if Which_Tymnet = 2 goto Show_AlaskaNet;
  25. if Which_Tymnet = 3 goto Show_PacNet;
  26.  
  27. show "Connecting to TYMNET";
  28. goto Wait_Tymnet;
  29.  
  30. Show_AlaskaNet:
  31.     show "Connecting to AlaskaNet";
  32.     goto Wait_Tymnet;
  33.  
  34. Show_PacNet:
  35.     show "Connecting to PacNet";
  36.  
  37. Wait_Tymnet:
  38.     wait
  39.         "Please "    goto Send_A,
  40.         "xxx"        goto Send_A,
  41.         "log in:"    goto Send_Tymnet_Host,
  42.         "User Name"    goto Send_Tymnet_Host,
  43.         "COMPUSERVE"    goto Return_Success,
  44.         "User ID:"    goto Return_Success
  45.     until 85;
  46.  
  47.     if not CR_Sent goto Send_CR;
  48.     if not A_Sent goto Send_A;
  49.     goto Tymnet_Failure;
  50.     
  51. Send_CR:
  52.     send %CR & %CR;
  53.     CR_Sent = %TRUE;
  54.     goto Wait_Tymnet;
  55.  
  56. Send_A:
  57.     if A_Sent goto Wait_Tymnet;
  58.     send "A";
  59.     A_Sent = %TRUE;
  60.     goto Wait_Tymnet;
  61.  
  62. Send_Tymnet_Host:
  63.     if Which_Tymnet = 3 goto Send_Pac_Host;
  64.     send "CPS" & %CR;
  65.     goto Wait_Tymnet;
  66.  
  67. Send_Pac_Host:
  68.     send "CNSG" & %CR;
  69.     goto Wait_Tymnet;
  70.  
  71. Tymnet_Failure:
  72.     if Which_Tymnet = 2 goto AlaskaNet_Failure;
  73.     if Which_Tymnet = 3 goto PacNet_Failure;
  74.     define %FailureMsg = "Tymnet: No answer";
  75.     exit %Failure;
  76.  
  77. AlaskaNet_Failure:
  78.     define %FailureMsg = "AlaskaNet: No answer";
  79.     exit %Failure;
  80.  
  81. PacNet_Failure:
  82.     define %FailureMsg = "PacNet: No answer";
  83.     exit %Failure;
  84.  
  85. Return_Cancel:
  86.     exit %Cancel;
  87.  
  88. Return_Success:
  89.     exit %Success;
  90.