home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 November / VPR9711A.ISO / VPR_DATA / Special / Koda202 / koda202.lzh / htmtop.mac < prev    next >
Text File  |  1997-03-07  |  3KB  |  53 lines

  1. //こだマクロ(HTML作成)
  2. //htmtop.mac
  3. //このマクロは「秀丸エディタ」用のマクロです。
  4. //97030722
  5. //
  6.  
  7. top:
  8.     if ( getinistr ( hidemarudir + "\\htmini.txt" , "Start" , "ini" ) =="まだ" ){
  9.         message "初期設定の確認をします。\nこれは今回のみで次回からは確認しません。\nまたこれから行う設定はあとから変更することができます。";
  10.         execmacro hidemarudir + "\\htmstart.mac";
  11.         writeinistr hidemarudir + "\\htmini.txt","Start",0,0;
  12.     }
  13.     title getinistr ( hidemarudir + "\\htmini.txt" , "Topmenu" , "title" );
  14.     #menu = getininum ( hidemarudir + "\\htmini.txt" , "Topmenu" , "num" );
  15.     #i = 0;
  16.     while ( #menu + 1 > #i ) {
  17.         $top[#i] = getinistr ( hidemarudir + "\\htmini.txt" , "Topmenu" , str ( #i ) );
  18.         $menu[#i] = leftstr ( $top[#i] , strstr ( $top[#i] , ":" ) );
  19.         $command[#i] = rightstr ( $top[#i] , strlen ( $top[#i] ) - strstr ( $top[#i] , ":" )  - 1 );
  20.         #i = #i + 1;
  21.     }
  22.     menuarray $menu, #menu + 1;
  23.     if ( result == 0 || strstr ( $menu[result-1] , "終" ) != -1 ) endmacro;
  24.     else if ( strstr ( $menu[result-1] , "ブラウザ" ) == -1 ) execmacro getinistr ( hidemarudir + "\\htmini.txt" , "Topmenu" , "macropath" ) + $command[result-1];
  25.     if ( strstr ( $menu[result-1] , "ブラウザ" ) != -1 || getinistr ( hidemarudir + "\\htmini.txt" , "Browser" , "check" ) != "off" ){
  26.         if ( getinistr ( hidemarudir + "\\htmini.txt" , "Browser" , "check" ) == "ask" && strstr ( $menu[result-1] , "ブラウザ" ) == -1 ) {
  27.             question getinistr ( hidemarudir + "\\htmini.txt" , "Browser" , "checkmsg" );
  28.             if ( result != getininum ( hidemarudir + "\\htmini.txt" , "Browser" , "checkdef" ) ) goto las;
  29.         }
  30.  
  31.  
  32.         save;
  33.         $app = getinistr ( hidemarudir + "\\htmini.txt" , "Browser" , "app" );
  34.         $topic = getinistr ( hidemarudir + "\\htmini.txt" , "Browser" , "topic" );
  35.         ddeinitiate $app,$topic;
  36.         if ( result == 0 ) {
  37.             run getinistr ( hidemarudir + "\\htmini.txt" , "Browser" , "path" ) + " %f";
  38.         }
  39. //一度ダミー信号を送り、実行後は常にアクティブにする。
  40. //これがないとファイル名が同じときは内容更新後のブラウザは秀丸の影に行く。
  41.         if ( getininum ( hidemarudir + "\\htmini.txt" , "Browser" , "active" ) == 1 ) ddeexecute "file:\\";
  42. //        ddeexecute "file:" + filename;
  43.         ddeexecute "file:///" + filename;
  44.         endmacro;
  45.  
  46.     }
  47.  
  48. las:
  49.     if ( getinistr ( hidemarudir + "\\htmini.txt" , "Line" , "ret" ) == "on" ) insertreturn;
  50.     writeinistr hidemarudir + "\\htmini.txt" , "Line" , "ret" , 0;
  51.     if ( getinistr ( hidemarudir + "\\htmini.txt" , "Topmenu" , "conti" ) == "yes" && strstr ( $menu[result-1] , "ブラウザ" ) == -1 && getinistr ( hidemarudir + "\\htmini.txt" , "Browser" , "check" ) == "off" ) goto top;
  52.     else endmacro;
  53.