home *** CD-ROM | disk | FTP | other *** search
/ Computer Buyer 1997 May / DPCB0597.iso / CSMX / SCRIPTS.LIB / TTNNET.SCR < prev    next >
Text File  |  1995-12-05  |  1KB  |  66 lines

  1. !
  2. !  Copyright (c) 1995
  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. !  TTN-NET:
  9. !    Connect to TTN-NET
  10. !    Success:  returns %Success
  11. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  12. !
  13. !+V
  14. ! "3.8.1"
  15. !-V
  16.  
  17. Attempts = 5;
  18. TTN_Address = "CNST";
  19. on cancel goto Return_Cancel;
  20. show "Connecting to TTN-Net";
  21.  
  22. Wait_TTN:
  23.     if Attempts = 0 goto Return_Failure;
  24.     Attempts = Attempts - 1;
  25.  
  26.     wait
  27.                 "9600"          goto Connect_9600,
  28.                 "2400"          goto Connect_Low,
  29.                 "1200"          goto Connect_Low,
  30.                 "CONNECT^M"     goto Connect_Low,
  31.         "@"        goto Send_Address,
  32.         "Host Name"    goto Return_Success,
  33.         "User ID"    goto Return_Success,
  34.         %mdm_Failure    goto Return_Failure
  35.     until 180;
  36.  
  37.     send %CR;
  38.     goto Wait_TTN;
  39.  
  40. Connect_9600:
  41.         send "@^M";
  42.         goto Wait_TTN;
  43.  
  44. Connect_Low:
  45.         send "^M.^M";
  46.         goto Wait_TTN;
  47.  
  48.  
  49. Send_Address:
  50.     show "Sending CompuServe Address...";
  51.     wait until 10;
  52.     send TTN_Address & %CR;
  53.     goto Wait_TTN;
  54.  
  55. Return_Failure:
  56.     define %FailureMsg = "TTN-Net not responding";
  57.     exit %Failure;
  58.  
  59. Return_Cancel:
  60.     exit %Cancel;
  61.  
  62. Return_Success:
  63.     send %CR;
  64.     exit %Success;
  65.  
  66.