home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / n / newscr.zip / NEWSCR.EXE / TYMNET.SCR < prev   
Text File  |  1991-10-16  |  2KB  |  67 lines

  1. !---------------------------------------------------------------------!
  2. !                                                                     !
  3. !  Copyright (c) 1991                                                 !  
  4. !  by CompuServe Incorporated, Columbus, Ohio                         !
  5. !                                                                     !
  6. !  The information in this software is subject to change without      !
  7. !  notice and should not be construed as a commitment by CompuServe.  !
  8. !                                                                     !
  9. !  TYMNET Purpose:                                                    !
  10. !     Connect to Tymnet                                               !
  11. !     Success:  returns %Success                                      !
  12. !     Failure:  saves error msg in %FailureMsg and returns %Failure   !
  13. !                                      !
  14. !     $Revision::   1.3      $                                        !
  15. !                                      !
  16. !---------------------------------------------------------------------!
  17.  
  18. A_Sent = %FALSE;
  19. CR_Sent = %FALSE;
  20.  
  21. show "Connecting to TYMNET";
  22. on cancel goto Return_Cancel;
  23.  
  24. Wait_Tymnet:
  25.  
  26.     wait
  27.         "Please "   goto Send_A,
  28.     "xxx"       goto Send_A,
  29.     "log in:"   goto Send_Tymnet_Host,
  30.     "User Name" goto Send_Tymnet_Host,
  31.     "HOST:"     goto Return_Success,
  32.     "User ID:"  goto Return_Success
  33.     until 85;
  34.  
  35.     if not CR_Sent goto Send_CR;
  36.     if not A_Sent goto Send_A;
  37.     goto Tymnet_Failure;
  38.     
  39. Send_CR:
  40.  
  41.     send %CR & %CR;
  42.     CR_Sent = %TRUE;
  43.     goto Wait_Tymnet;
  44.  
  45. Send_A:
  46.  
  47.     if A_Sent goto Wait_Tymnet;
  48.     send "A";
  49.     A_Sent = %TRUE;
  50.     goto Wait_Tymnet;
  51.  
  52. Send_Tymnet_Host:
  53.  
  54.     send "CPS" & %CR;
  55.     goto Wait_Tymnet;
  56.  
  57. Tymnet_Failure:
  58.     define %FailureMsg = "Tymnet: no answer";
  59.     exit %Failure;
  60.  
  61. Return_Cancel:
  62.     exit %Cancel;
  63.  
  64. Return_Success:
  65.     exit %Success;
  66.  
  67.