home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 March / VPR9603A.ISO / guiterm / niftyman / sttnet.sc_ / sttnet.sc
Text File  |  1995-11-09  |  2KB  |  85 lines

  1. !
  2. !  Copyright (c) 1995
  3. !  by NIFTY Corporation, Tokyo, Japan
  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 NIFTY-Serve.
  8. !
  9. !  FENICS-ROAD 2 TTNet:
  10. !    Connect to FENICS-ROAD 2 TTNet
  11. !    Success:  returns %Success
  12. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  13. !
  14. !+V
  15. ! "3.5"
  16. !-V
  17.  
  18. !show "FENICS-ROAD 2 TTNet に接続されました"; 
  19. Tries = 2;
  20. on cancel goto Return_Cancel;
  21. wait until 50;
  22.  
  23. Wait_HOST:
  24.     if Tries = 0 goto Return_Failure;
  25.     Tries = Tries - 1;
  26.  
  27.     send "@P" + %CR;
  28.     wait
  29.         "*"        goto Send_NIF,
  30.         %mdm_Failure    goto Return_Failure
  31.     until 150;
  32.     goto Wait_HOST;
  33.  
  34.  
  35. Send_NIF:
  36.     send "C NIF" & %CR;
  37.  
  38. Tries = 3;
  39. Wait_FENICS2:
  40.     if Tries = 0 goto Return_Failure;
  41.     Tries = Tries - 1;
  42.  
  43.     wait
  44.         "Enter Connection-ID"    goto Send_FENICS2_Host,
  45.         %mdm_Failure        goto Return_Failure
  46.     until 80;
  47.     goto Wait_FENICS2;
  48.  
  49. Send_FENICS2_Host:
  50.     wait until 10;
  51. !    show "サインアップを開始します";
  52.     send "PSG" & %CR; 
  53.  
  54. Tries = 5;
  55. Wait_ENQ:
  56.     if Tries = 0 goto Return_Failure;
  57.     Tries = Tries - 1;
  58.  
  59.     wait
  60.         %ENQ            goto Send_SIGNUP,
  61.         %NAK            goto Return_Failure
  62.         %mdm_Failure        goto Return_Failure
  63.     until 80;
  64.     goto Wait_ENQ;
  65.  
  66.  
  67. Send_SIGNUP:
  68.     wait until 10;
  69. !    show "サインアップの登録データを送信しています";
  70.     signup : Result; 
  71. !    show "サインアップの登録データの送信が終了しました";
  72.     if Result = %Success goto Return_Success;
  73.     if Result = %Cancel goto Return_Cancel;
  74.     
  75. Return_Failure:
  76.     define %FailureMsg = "FENICS-ROAD 2 TTNet が反応しません";
  77.     exit %Failure;
  78.  
  79. Return_Cancel:
  80.     exit %Cancel;
  81.  
  82. Return_Success:
  83.     wait until 10;
  84.     exit %Success;
  85.