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 / FENICS.SCR < prev    next >
Text File  |  1993-01-04  |  2KB  |  76 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 FENICS through either NIFTY LL or CompuPass.         !
  11. !     Arg1 contains TRUE if connect is to NIFTY LL and FALSE otherwise!
  12. !     Success:  returns %Success                                      !
  13. !     Failure:  saves error msg in %FailureMsg and returns %Failure   !
  14. !                                                                     !
  15. !     $Revision::   1.5      $                                        !
  16. !                                                                     !
  17. !---------------------------------------------------------------------!
  18.  
  19. Host_Sent = %FALSE;
  20.  
  21. if Arg1 goto Define_NIF_Strings;
  22.  
  23.     ConnectStr = "Connecting to CompuPass";
  24.     FailStr = "CompuPass not responding";
  25.     HostStr = "C CIS" & %CR;
  26.     goto Start_FENICS;
  27.  
  28. Define_NIF_Strings:
  29.  
  30.     ConnectStr = "Connecting to NIFTY LL";
  31.     FailStr = "NIFTY LL not responding";
  32.     HostStr = "C CPS" & %CR;
  33.  
  34. Start_FENICS:
  35.  
  36.     show ConnectStr;
  37.     Tries = 5;
  38.     on cancel goto Return_Cancel;
  39.  
  40. Wait_FENICS:
  41.  
  42.     if Tries = 0 goto FENICS_Failure;
  43.     Tries = Tries - 1;
  44.  
  45.     wait
  46.         "ready"        goto Send_FENICS_Host,
  47.         "User ID:"     goto Check_Success,
  48.         "Host Name:"   goto Check_Success
  49.     until 80;
  50.  
  51.     send %CR & %CR & %CR;
  52.     Host_Sent = %FALSE;
  53.     goto Wait_FENICS;
  54.  
  55. Send_FENICS_Host:
  56.  
  57.     if Host_Sent goto Wait_FENICS;
  58.  
  59.     send HostStr;
  60.     Host_Sent = %TRUE;
  61.     goto Wait_FENICS;
  62.  
  63. Check_Success:
  64.     if Host_Sent goto Return_Success;
  65.     goto Wait_FENICS;
  66.  
  67. FENICS_Failure:
  68.     define %FailureMsg = FailStr;
  69.     exit %Failure;
  70.  
  71. Return_Cancel:
  72.     exit %Cancel;
  73.  
  74. Return_Success:
  75.     exit %Success;
  76.