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 / INFONET.SCR < prev    next >
Text File  |  1993-01-04  |  3KB  |  92 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. !  InfoNet Script:                                                    !
  10. !     Connect to InfoNet or InfoNet-Europe.  Arg1 contains TRUE if    !
  11. !     connect is to InfoNet-Europe and FALSE otherwise.               !
  12. !     Success:  returns %Success                                      !
  13. !     Failure:  saves error msg in %FailureMsg and returns %Failure   !
  14. !                                                                     !
  15. !     $Revision::   1.6         $                                     !
  16. !                                                                     !
  17. !---------------------------------------------------------------------!
  18.  
  19. Europe = Arg1;
  20.  
  21. if Europe goto Init_Europe;
  22.     show "Connecting to InfoNet World-Connect";
  23.     FailStr  = "InfoNet World-Connect not responding";
  24.     FailStr2 = "InfoNet World-Connect not connecting";
  25.     goto Init_Common;
  26.  
  27. Init_Europe:
  28.     show "Connecting to InfoNet Euro-Connect";
  29.     FailStr = "InfoNet Euro-Connect not responding";
  30.     FailStr2 = "InfoNet Euro-Connect not connecting";
  31.  
  32. Init_Common:
  33.     Tries = 5;
  34.  
  35.     Timeout = 10;
  36.     Got_Center = %FALSE;
  37.     on cancel goto Return_Cancel;
  38.  
  39. Wait_InfoNet:
  40.  
  41.     wait
  42.         "#"                     goto Send_Response,
  43.         "Center"                goto Send_InfoNet_Host,
  44.         "Centre"                goto Send_InfoNet_Host,
  45.         "COMMUNICATION"         goto Return_Success
  46.     until Timeout;
  47.  
  48.     Timeout = 50;
  49.     if Tries = 0 goto InfoNet_Failure;
  50.  
  51.     Tries = Tries - 1;
  52.     send %CR & %CR & %CR;
  53.     goto Wait_InfoNet;
  54.  
  55. Send_Response:
  56.  
  57.     if Got_Center goto Wait_InfoNet;
  58.  
  59.     send "C" & %CR;
  60.     Timeout = 195;
  61.     goto Wait_InfoNet;
  62.  
  63. Send_InfoNet_Host:
  64.  
  65.     if Europe goto Send_InfoNet_Europe_Host;
  66.     send "CPS" & %CR;
  67.     goto Finish_Send_Host;
  68.  
  69. Send_InfoNet_Europe_Host:
  70.  
  71.     send "CSF" & %CR;
  72.  
  73. Finish_Send_Host:
  74.  
  75.     FailStr = FailStr2;
  76.     if Tries = 0 goto InfoNet_Failure;
  77.  
  78.     Tries = Tries - 1;
  79.     Got_Center = %TRUE;
  80.     Timeout = 835;
  81.     goto Wait_InfoNet;
  82.  
  83. InfoNet_Failure:
  84.     define %FailureMsg = FailStr;
  85.     exit %Failure;
  86.  
  87. Return_Cancel:
  88.     exit %Cancel;
  89.  
  90. Return_Success:
  91.     exit %Success;
  92.