home *** CD-ROM | disk | FTP | other *** search
/ Curio City 9 / CURIO9.bin / pc / internet / win / w95nim / program / data.z / SINFONET.SCR < prev    next >
Text File  |  1997-09-10  |  2KB  |  95 lines

  1. !
  2. !  Copyright (c) 1996
  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 = 5;
  20. wait until 50;
  21.  
  22. Wait_HOST:
  23.     if Tries = 0 goto Return_Failure;
  24.     Tries = Tries - 1;
  25.  
  26.     send %CR;
  27.     wait until 20;
  28.     send %CR;
  29.     wait until 20;
  30.     send %CR;
  31.     wait until 20;
  32.     send %CR;
  33.     wait until 20;
  34.     send %CR;
  35.     send "C" & %CR;
  36.     wait
  37.         ":"        goto Send_NIF,
  38.         %mdm_Failure    goto Return_Failure
  39.     until 150;
  40.     goto Wait_HOST;
  41.  
  42.  
  43. Send_NIF:
  44.     send "NIF" & %CR;
  45.  
  46. Tries = 5;
  47. Wait_infonet:
  48.     if Tries = 0 goto Return_Failure;
  49.     Tries = Tries - 1;
  50.  
  51.     wait
  52.         "Enter Connection-ID"    goto Send_infonet_Host,
  53.         %mdm_Failure        goto Return_Failure
  54.     until 80;
  55.     goto Wait_infonet;
  56.  
  57. Send_infonet_Host:
  58.     wait until 10;
  59.     guide "サインアップを開始します";
  60.     send "PSG" & %CR; 
  61.  
  62. Tries = 5;
  63. Wait_ENQ:
  64.     if Tries = 0 goto Return_Failure;
  65.     Tries = Tries - 1;
  66.  
  67.     wait
  68.         %ENQ            goto Send_SIGNUP,
  69.         %NAK            goto Return_Failure
  70.         %mdm_Failure        goto Return_Failure
  71.     until 80;
  72.     goto Wait_ENQ;
  73.  
  74.  
  75. Send_SIGNUP:
  76.     wait until 10;
  77.     guide "登録データを送信しています";
  78.     signup : Result; 
  79.     guide "登録データの送信が終了しました";
  80.     if Result = %Success goto Return_Success;
  81.     if Result = %Cancel goto Return_Cancel;
  82.     
  83. Return_Failure:
  84.     define %FailureMsg = "Infonet が反応しません";
  85.     %ErrorCode = 2050;
  86.     exit %ErrorCode;
  87. !    exit %Failure;
  88.  
  89. Return_Cancel:
  90.     exit %Cancel;
  91.  
  92. Return_Success:
  93.     wait until 10;
  94.     exit %Success;
  95.