home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 March / VPR9603A.ISO / guiterm / niftyman / smnp10.sc_ / smnp10.sc
Text File  |  1995-11-09  |  2KB  |  84 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 3 MNP10:
  10. !    Connect to FENICS-ROAD 3 MNP10
  11. !    Success:  returns %Success
  12. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  13. !
  14. !+V
  15. ! "3.5"
  16. !-V
  17. !show "FENICS-ROAD 3 MNP10 に接続されました"; 
  18. Tries = 2;
  19. on cancel goto Return_Cancel;
  20. wait until 10;
  21.  
  22. Wait_HOST:
  23.     if Tries = 0 goto Return_Failure;
  24.     Tries = Tries - 1;
  25.  
  26.     wait
  27.         "*"        goto Send_NIF,
  28.         %mdm_Failure    goto Return_Failure
  29.     until 100;
  30. !    send %CR;
  31.     goto Wait_HOST;
  32.  
  33.  
  34. Send_NIF:
  35.     send "C NIF" & %CR;
  36.  
  37. Tries = 3;
  38. Wait_FENICS3:
  39.     if Tries = 0 goto Return_Failure;
  40.     Tries = Tries - 1;
  41.  
  42.     wait
  43.         "Enter Connection-ID"    goto Send_FENICS3_Host,
  44.         %mdm_Failure        goto Return_Failure
  45.     until 80;
  46.     goto Wait_FENICS3;
  47.  
  48. Send_FENICS3_Host:
  49.     wait until 10;
  50. !    show "サインアップを開始します";
  51.     send "PSG" & %CR; 
  52.  
  53. Tries = 5;
  54. Wait_ENQ:
  55.     if Tries = 0 goto Return_Failure;
  56.     Tries = Tries - 1;
  57.  
  58.     wait
  59.         %ENQ            goto Send_SIGNUP,
  60.         %NAK            goto Return_Failure
  61.         %mdm_Failure        goto Return_Failure
  62.     until 80;
  63.     goto Wait_ENQ;
  64.  
  65.  
  66. Send_SIGNUP:
  67.     wait until 10;
  68. !    show "サインアップの登録データを送信しています";
  69.     signup : Result; 
  70. !    show "サインアップの登録データの送信が終了しました";
  71.     if Result = %Success goto Return_Success;
  72.     if Result = %Cancel goto Return_Cancel;
  73.     
  74. Return_Failure:
  75.     define %FailureMsg = "FENICS-ROAD 3 が反応しません";
  76.     exit %Failure;
  77.  
  78. Return_Cancel:
  79.     exit %Cancel;
  80.  
  81. Return_Success:
  82.     wait until 10;
  83.     exit %Success;
  84.