home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 5 / FREESOFT.BIN / mopterm / fapx405b / fapxdset.plp < prev    next >
Text File  |  1992-08-19  |  7KB  |  298 lines

  1. /************************************************************************
  2. *    ダウンロード制御ファイルを指定する                *
  3. /************************************************************************/
  4. %SETCNTL2{
  5.     var    cntl    [256];
  6.     dnldcntl:={};
  7.     footnote({制御ファイルの種類は?});
  8.     SNDMSG({erande_f.snd});
  9.     select    ({制御ファイルの種類は?},
  10.         Wtime4,,
  11.         {  メ  モ  },
  12.         {case    (@mlast,
  13.             0,
  14.             {
  15.             footnote({メモがありません 次の処理は?});
  16.             SNDMSG({erande_f.snd});
  17.             select    ({メモがありません},
  18.                 Wtime4,,
  19.                 {再指定},SETCNTL2,
  20.                 {中  止},
  21.                 )
  22.             },
  23.             1,
  24.             {dnldcntl:={memo1}},
  25.             2,
  26.             {
  27.             footnote({メモ番号は?});
  28.             SNDMSG({erande_f.snd});
  29.             select    ({メモ番号は?},
  30.                 Wtime4,,
  31.                 {メモ1},{dnldcntl:={memo1}},
  32.                 {メモ2},{dnldcntl:={memo2}}
  33.                 )
  34.             },
  35.             3,
  36.             {
  37.             footnote({メモ番号は?});
  38.             SNDMSG({erande_f.snd});
  39.             select    ({メモ番号は?},
  40.                 Wtime4,,
  41.                 {メモ1},{dnldcntl:={memo1}},
  42.                 {メモ2},{dnldcntl:={memo2}},
  43.                 {メモ3},{dnldcntl:={memo3}}
  44.                 )
  45.             },
  46.             4,
  47.             {
  48.             footnote({メモ番号は?});
  49.             SNDMSG({erande_f.snd});
  50.             select    ({メモ番号は?},
  51.                 Wtime4,,
  52.                 {メモ1},{dnldcntl:={memo1}},
  53.                 {メモ2},{dnldcntl:={memo2}},
  54.                 {メモ3},{dnldcntl:={memo3}},
  55.                 {メモ4},{dnldcntl:={memo4}}
  56.                 )
  57.             },
  58.             5,
  59.             {
  60.             footnote({メモ番号は?});
  61.             SNDMSG({erande_f.snd});
  62.             select    ({メモ番号は?},
  63.                 Wtime4,,
  64.                 {メモ1},{dnldcntl:={memo1}},
  65.                 {メモ2},{dnldcntl:={memo2}},
  66.                 {メモ3},{dnldcntl:={memo3}},
  67.                 {メモ4},{dnldcntl:={memo4}},
  68.                 {メモ5},{dnldcntl:={memo5}}
  69.                 )
  70.             },
  71.             6,
  72.             {
  73.             footnote({メモ番号は?});
  74.             SNDMSG({erande_f.snd});
  75.             select    ({メモ番号は?},
  76.                 Wtime4,,
  77.                 {メモ1},{dnldcntl:={memo1}},
  78.                 {メモ2},{dnldcntl:={memo2}},
  79.                 {メモ3},{dnldcntl:={memo3}},
  80.                 {メモ4},{dnldcntl:={memo4}},
  81.                 {メモ5},{dnldcntl:={memo5}},
  82.                 {メモ6},{dnldcntl:={memo6}}
  83.                 )
  84.             },
  85.             7,
  86.             {
  87.             footnote({メモ番号は?});
  88.             SNDMSG({erande_f.snd});
  89.             select    ({メモ番号は?},
  90.                 Wtime4,,
  91.                 {メモ1},{dnldcntl:={memo1}},
  92.                 {メモ2},{dnldcntl:={memo2}},
  93.                 {メモ3},{dnldcntl:={memo3}},
  94.                 {メモ4},{dnldcntl:={memo4}},
  95.                 {メモ5},{dnldcntl:={memo5}},
  96.                 {メモ6},{dnldcntl:={memo6}},
  97.                 {メモ7},{dnldcntl:={memo7}}
  98.                 )
  99.             },
  100.             8,
  101.             {
  102.             footnote({メモ番号は?});
  103.             SNDMSG({erande_f.snd});
  104.             select    ({メモ番号は?},
  105.                 Wtime4,,
  106.                 {メモ1},{dnldcntl:={memo1}},
  107.                 {メモ2},{dnldcntl:={memo2}},
  108.                 {メモ3},{dnldcntl:={memo3}},
  109.                 {メモ4},{dnldcntl:={memo4}},
  110.                 {メモ5},{dnldcntl:={memo5}},
  111.                 {メモ6},{dnldcntl:={memo6}},
  112.                 {メモ7},{dnldcntl:={memo7}},
  113.                 {メモ8},{dnldcntl:={memo8}}
  114.                 )
  115.             },
  116.             9,
  117.             {
  118.             footnote({メモ番号は?});
  119.             SNDMSG({erande_f.snd});
  120.             select    ({メモ番号は?},
  121.                 Wtime4,,
  122.                 {メモ1},{dnldcntl:={memo1}},
  123.                 {メモ2},{dnldcntl:={memo2}},
  124.                 {メモ3},{dnldcntl:={memo3}},
  125.                 {メモ4},{dnldcntl:={memo4}},
  126.                 {メモ5},{dnldcntl:={memo5}},
  127.                 {メモ6},{dnldcntl:={memo6}},
  128.                 {メモ7},{dnldcntl:={memo7}},
  129.                 {メモ8},{dnldcntl:={memo8}},
  130.                 {メモ9},{dnldcntl:={memo9}}
  131.                 )
  132.             }
  133.             );
  134.         },
  135.         { ファイル },
  136.         {
  137.         footnote({ダウンロード制御ファイルは?});
  138.         SNDMSG({erande_f.snd});
  139.         dnldcntl:=@filesel;
  140.         case    (dnldcntl={},
  141.             {No},
  142.             {
  143.             case    (@nochar(@getcdir)==3,
  144.                 {Yes},        /* root dir */
  145.                 {dnldcntl:=@getcdir|dnldcntl},
  146.                 {No},
  147.                 {dnldcntl:=@getcdir|{\}|dnldcntl}
  148.                 )
  149.             },
  150.             {Yes},
  151.             );
  152.         },
  153.         { 新規作成 },
  154.         {
  155.         SETUP2;
  156.         dnldcntl:=TEMP2|{_mopdnld.ctl};
  157.         }
  158.         );
  159.     setcdir(CDIR);
  160.     };
  161. /************************************************************************
  162. *    オートダウンロード制御ファイル作成処理                *
  163. *************************************************************************/
  164.  
  165. %SETUP2    {
  166.     dispoff({Yes});
  167.     command    ({del }|TEMP2|{_mopdnld.ctl});
  168.     dispoff({No});
  169.     loop    ({
  170.         footnote({ダウンロード元を指定して下さい});
  171.         SNDMSG({erande_f.snd});
  172.         select    ({ダウンロード元を指定して下さい},
  173.             Wtime4,    {im({No})},
  174.             {データライブラリ},{AUTOdlib;    im({Yes})},
  175.             {プロフィール情報},{AUTOprof;    im({Yes})},
  176.             {     終  了     },{im({No})}
  177.             )
  178.         });
  179.     display({\n\n});
  180.     command({type }|TEMP2|{_mopdnld.ctl});
  181.     footnote({制御ファイルを確認してください});
  182.     SNDMSG({kaknin_f.snd});
  183.     select    ({制御ファイルを確認してください},
  184.         Wtime4,    {},
  185.         { O  K },{},
  186.         { N  G },{SETUP2},
  187.         { 中  止 },{dnldcntl:={}}
  188.         );
  189.     };
  190.  
  191. /*    データライブラリからのダウンロード制御文作成    */
  192. %AUTOdlib
  193.     {
  194.     footnote({データライブラリからのダウンロード制御文作成});
  195.     var    forum    [8];
  196.     var    libno    [2];
  197.     var    datano    [3];
  198.     var    dataname[40];
  199.     var    datafile[64];
  200.     var    docfile    [64];
  201.     var    ok    [2];
  202.     loop    ({
  203.         SNDMSG({nyuryo_f.snd});
  204.         %a    @plane(    {cデータライブラリからのダウンロード\n}|
  205.                 {t フォーラム名 /xxxxxxxx\n}|
  206.                 {tライブラリ番号/xx\n}|
  207.                 {t  データ番号  /xxx\n}|
  208.                 {tデータファイル/\n}|
  209.                 {s              ファイル一覧/ 選択 \n}|
  210.                 {t 概要ファイル /\n}|
  211.                 {s              ファイル一覧/ 選択 \n}|
  212.                 {s              / 登録 / 取消 \n},
  213.                 forum,libno,datano,datafile,docfile);
  214.         
  215.         forum:=        @head(@getline(a,1,1),{\n});
  216.         libno:=        @head(@getline(a,2,1),{\n});
  217.         datano:=    @head(@getline(a,3,1),{\n});
  218.         datafile:=    @head(@getline(a,4,1),{\n});
  219.         %sel1        @head(@getline(a,5,1),{\n});
  220.         docfile:=    @head(@getline(a,6,1),{\n});
  221.         %sel2        @head(@getline(a,7,1),{\n});
  222.         ok:=        @head(@getline(a,8,1),{\n});
  223.         case    (sel1==1,{Yes},
  224.             {datafile:=@FILEsel1;
  225.             docfile:=@body(datafile,,{.})|{.ggg};im({Yes})});
  226.         case    (sel2==1,{Yes},{docfile:=@FILEsel2;im({Yes})});
  227.         });
  228.     case    (ok==1,{Yes},
  229.         {
  230.         %cntl    {forum=}|forum|{;}|    {libno=}|libno|{;}|
  231.             {datano=}|datano|{;}|    {datafile=}|datafile|{;}|
  232.             {docfile=}|docfile|{;};
  233.         write(TEMP2|{_mopdnld.ctl},cntl|{\n});
  234.         });
  235.     };
  236.  
  237. /*    ダウンロードファイル指定処理    */
  238. %FILEsel1{
  239.     var    dnfile    [64];
  240.     SNDMSG({erande_f.snd});
  241.     dnfile:=@filesel;
  242.     case    (dnfile,
  243.         {},{im({})},
  244.         ,
  245.         {
  246.         case    (@nochar(@getcdir)=3,
  247.             {Yes},    {dnfile:=@getcdir|dnfile},
  248.             {No},    {dnfile:=@getcdir|{\}|dnfile}
  249.             )
  250.         }
  251.         );
  252.     im(dnfile);
  253.     };
  254.  
  255. /*    ダウンロードファイル指定処理(メモ指定可能)    */
  256. %FILEsel2{
  257.     var    dnfile    [64];
  258.     SNDMSG({erande_f.snd});
  259.     dnfile:=@filesel;
  260.     case    (dnfile,
  261.         {},    {im({})},
  262.         {memo1},{im(dnfile)},
  263.         {memo2},{im(dnfile)},
  264.         {memo3},{im(dnfile)},
  265.         {memo4},{im(dnfile)},
  266.         {memo5},{im(dnfile)},
  267.         {memo6},{im(dnfile)},
  268.         {memo7},{im(dnfile)},
  269.         {memo8},{im(dnfile)},
  270.         {memo9},{im(dnfile)},
  271.         ,    {case    (@nochar(@getcdir)=3,
  272.                 {Yes},    {dnfile:=@getcdir|dnfile},
  273.                 {No},    {dnfile:=@getcdir|{\}|dnfile}
  274.                 )
  275.             }
  276.         );
  277.     im(dnfile);
  278.     };
  279.  
  280. /*    プロフィール情報のダウンロード制御文作成    */
  281. %AUTOprof{
  282.     footnote({プロフィール情報ダウンロード制御文作成});
  283.     SNDMSG({nyuryo_f.snd});
  284.     %a    @plane(    {cプロフィール情報ダウンロード\n}|
  285.             {t   ID番号   /xxxxxxxx\n}|
  286.             {s              / 登録 / 取消 \n},
  287.             );
  288.     %id    @head(@getline(a,1,1),{\n});
  289.     %ok    @head(@getline(a,2,1),{\n});
  290.     case    (ok==1,{Yes},
  291.         {
  292.         %cntl    {profile=}|id|{;};
  293.         write(TEMP2|{_mopdnld.ctl},cntl|{\n});
  294.         });
  295.     };
  296.  
  297. SETCNTL2;
  298.