home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703B.ISO / terminal / niftyman / w95nim / program / data.z / SINFONET.SCR < prev    next >
Text File  |  1996-11-19  |  2KB  |  96 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 CompuServe.
  8. !
  9. !  Infonet:
  10. !    Connect to Infonet
  11. !    Success:  returns %Success
  12. !    Failure:  saves error msg in %FailureMsg and returns %Failure
  13. !
  14. !+V
  15. ! "3.5"
  16. !-V
  17.  
  18. guide "Infonet に接続されました"; 
  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 %CR;
  28.     wait until 20;
  29.     send %CR;
  30.     wait until 20;
  31.     send %CR;
  32.     wait until 20;
  33.     send %CR;
  34.     wait until 20;
  35.     send %CR;
  36.     send "C" & %CR;
  37.     wait
  38.         ":"        goto Send_NIF,
  39.         %mdm_Failure    goto Return_Failure
  40.     until 150;
  41.     goto Wait_HOST;
  42.  
  43.  
  44. Send_NIF:
  45.     send "NIF" & %CR;
  46.  
  47. Tries = 3;
  48. Wait_infonet:
  49.     if Tries = 0 goto Return_Failure;
  50.     Tries = Tries - 1;
  51.  
  52.     wait
  53.         "Enter Connection-ID"    goto Send_infonet_Host,
  54.         %mdm_Failure        goto Return_Failure
  55.     until 80;
  56.     goto Wait_infonet;
  57.  
  58. Send_infonet_Host:
  59.     wait until 10;
  60.     guide "サインアップを開始します";
  61.     send "PSG" & %CR; 
  62.  
  63. Tries = 5;
  64. Wait_ENQ:
  65.     if Tries = 0 goto Return_Failure;
  66.     Tries = Tries - 1;
  67.  
  68.     wait
  69.         %ENQ            goto Send_SIGNUP,
  70.         %NAK            goto Return_Failure
  71.         %mdm_Failure        goto Return_Failure
  72.     until 80;
  73.     goto Wait_ENQ;
  74.  
  75.  
  76. Send_SIGNUP:
  77.     wait until 10;
  78.     guide "登録データを送信しています";
  79.     signup : Result; 
  80.     guide "登録データの送信が終了しました";
  81.     if Result = %Success goto Return_Success;
  82.     if Result = %Cancel goto Return_Cancel;
  83.     
  84. Return_Failure:
  85.     define %FailureMsg = "Infonet が反応しません";
  86.     %ErrorCode = 2050;
  87.     exit %ErrorCode;
  88. !    exit %Failure;
  89.  
  90. Return_Cancel:
  91.     exit %Cancel;
  92.  
  93. Return_Success:
  94.     wait until 10;
  95.     exit %Success;
  96.