home *** CD-ROM | disk | FTP | other *** search
/ Micro Cookbook 5 / COOKWORKS.BIN / partners / wincim / scripts.lib / INTERNET.SCR < prev    next >
Text File  |  1994-05-17  |  1KB  |  65 lines

  1. !
  2. !  Copyright (c) 1993
  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. !  Internet:
  9. !    Success:  returns %Success
  10. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  11. !
  12. !+V
  13. ! "3.5"
  14. !-V
  15.  
  16. Tries = 5;
  17. on cancel goto Return_Cancel;
  18. show "Connecting to Internet";
  19. Wait_Time = 20;
  20.  
  21. Wait_Host_Name:
  22.     if Tries = 0 goto Internet_Failure;
  23.     Tries = Tries - 1;
  24.     wait
  25.         "Host Name"        goto Send_Host_Name
  26.     until Wait_Time;
  27.  
  28.     send "^M";
  29.     Wait_Time = 200;
  30.     goto Wait_Host_Name;
  31.  
  32. Wait_Internet:
  33.     if Tries = 0 goto Internet_Failure;
  34.     Tries = Tries - 1;
  35.     wait
  36.         "Host Name"        goto Send_Host_Name,
  37.         "User ID"        goto Return_User_ID,
  38.         "OFF):"            goto Send_Baud_Rate
  39.     until 200;
  40.  
  41.     send "^M";
  42.     goto Wait_Internet;
  43.  
  44. Send_Host_Name: 
  45.     send "CISAGREE^M";
  46.     goto Wait_Internet;
  47.  
  48. Send_Baud_Rate:
  49.     send %BaudRate;
  50.     send "^M";
  51.     goto Return_Success;
  52.  
  53. Internet_Failure:
  54.     define %FailureMsg = "Internet not responding";
  55.     exit %Failure;
  56.  
  57. Return_Cancel:
  58.     exit %Cancel;
  59.  
  60. Return_User_ID:
  61.     send %CR;
  62.     wait until 10;
  63. Return_Success:
  64.     exit %Success;
  65.