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 / FALNET.SCR < prev    next >
Text File  |  1992-04-06  |  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. !  FENICS Script:                                                     !
  10. !     Connect to FALNET                                               !
  11. !     Success:  returns %Success                                      !
  12. !     Failure:  saves error msg in %FailureMsg and returns %Failure   !
  13. !                                                                     !
  14. !     $Revision::   1.4      $                                        !
  15. !                                                                     !
  16. !---------------------------------------------------------------------!
  17.  
  18. Host_Sent = %FALSE;
  19.  
  20.  
  21.     ConnectStr = "Connecting to FALNET";
  22.     FailStr = "FALNET not responding";
  23.     HostStr = "C CIS" & %CR;
  24.  
  25. Start_FENICS:
  26.  
  27.     show ConnectStr;
  28.     Tries = 5;
  29.     on cancel goto Return_Cancel;
  30.  
  31. Wait_FENICS:
  32.  
  33.     if Tries = 0 goto FENICS_Failure;
  34.     Tries = Tries - 1;
  35.  
  36.     wait
  37.     "READY"                         goto Send_FENICS_Host,
  38.     "User ID:"                      goto Check_Success,
  39.     "Host Name:"                    goto Check_Success
  40.     until 80;
  41.  
  42.     send %CR & %CR & %CR;
  43.     Host_Sent = %FALSE;
  44.     goto Wait_FENICS;
  45.  
  46. Send_FENICS_Host:
  47.  
  48.     if Host_Sent goto Wait_FENICS;
  49.  
  50.     send HostStr;
  51.     Host_Sent = %TRUE;
  52.     goto Wait_FENICS;
  53.  
  54. Check_Success:
  55.     if Host_Sent goto Return_Success;
  56.     goto Wait_FENICS;
  57.  
  58. FENICS_Failure:
  59.     define %FailureMsg = FailStr;
  60.     exit %Failure;
  61.  
  62. Return_Cancel:
  63.     exit %Cancel;
  64.  
  65. Return_Success:
  66.     exit %Success;
  67.