home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 November
/
VPR9711A.ISO
/
VPR_DATA
/
Special
/
Koda202
/
koda202.lzh
/
kodama
/
htmlist.mac
< prev
next >
Wrap
Text File
|
1997-02-16
|
5KB
|
159 lines
//こだマクロ(HTML作成)
//htmlist.mac
//このマクロは「秀丸エディタ」用のマクロです。
//97013014
//
list:
title "箇条書きの定義 - こだマクロ";
#menu = getininum ( hidemarudir + "\\htmini.txt" , "List" , "defnum" );
#i = 0;
while ( #menu + 1 > #i ) {
$top[#i] = getinistr ( hidemarudir + "\\htmini.txt" , "List" , "def" + str ( #i ) );
$menu[#i] = leftstr ( $top[#i] , strstr ( $top[#i] , ":" ) );
$command[#i] = rightstr ( $top[#i] , strlen ( $top[#i] ) - strstr ( $top[#i] , ":" ) - 1 );
#i = #i + 1;
}
menuarray $menu, #menu + 1;
#re = result-1;
if ( $command[#re] == "LH" ) {
call line 2,"<LH>","<LH>";
if ( $$return == "" ) $ins = "<LH>";
insert $ins + $$return;
} else if ( $command[#re] == "LI" ) {
call type;
$lip = "<LI" + $$return + ">";
call line 2,$lip,"<LI>";
if ( $$return == "" ) $ins = "<LI>";
insert $ins + $$return;
} else if ( $command[#re] == "DT" || $command[#re] == "DD" ) {
call line 1,"<" + $command[#re] + ">","<" + $command[#re] + ">"; if ( $$return == "" ) $ins = "<" + $command[#re] + ">";
insert $ins + $$return;
} else if ( $command[#re] == "UL" ) {
call line 1,"","";
$line = $$return;
call type2;
insert "<UL" + $$return + $line + "</UL>";
} else if ( $command[#re] == "OL" ) {
call line 1,"","";
$line = $$return;
call type3;
question "開始番号:無指定でいいですか?";
if ( result == no ){
$st = input ( "開始番号を指定してください" );
call zenkaku $st;
$st = " START=\"" + $$return + "\">";
}else {
$st = ">";
}
insert "<OL" + $type + $st + $line + "</OL>";
} else if ( $command[#re] == "DL" ) {
title "定義型の箇条書きを作る - こだマクロ";
call line 1,"","";
question "定義行と意味行を違う行に表示しますか?(初期設定)";
if ( result == no ) $dl = " COMPACT>";
else $dl = ">";
insert "<DL" + $dl + $$return + "</DL>";
}
endmacro;
type:
title "いろいろな記号付きの箇条書きを作る - こだマクロ";
$type[0] = "無指定";
$type[1] = "(&I)大文字ローマ文字";
$type[2] = "(&i)小文字ローマ文字";
$type[3] = "(&A)大文字アルファベット";
$type[4] = "(&a)小文字アルファベット";
$type[5] = "(&1)通常の数字";
$type[6] = "(&Disc)●";
$type[7] = "(&Circle)□";
$type[8] = "(&Square)■";
$type[9] = "任意指定";
$ty[2] = "I";
$ty[3] = "i";
$ty[4] = "A";
$ty[5] = "a";
$ty[6] = "1";
$ty[7] = "disc";
$ty[8] = "circle";
$ty[9] = "square";
menuarray $type,10;
#re = result;
if ( #re == 1 ) $type = "";
else if ( #re == 10 ) $type = " TYPE=\"" + input ( "指定してください" ) + "\"";
else $type = " TYPE=\"" + $ty[#re] + "\"";
if ( #re >= 2 && #re <= 6 ){
question "開始番号:無指定でいいですか?";
if ( result == no ){
$st = input ( "開始番号を指定してください" );
call zenkaku $st;
$type = $type + " VALUE=\"" + $$return + "\"";
}
}
return $type;
type2:
title "記号付きの箇条書きを作る - こだマクロ";
$type[0] = "無指定";
$type[1] = "(&Disc)●";
$type[2] = "(&Circle)□";
$type[3] = "(&Square)■";
$type[4] = "任意指定";
$ty[2] = "disc";
$ty[3] = "circle";
$ty[4] = "square";
menuarray $type,5;
if ( result == 1 ) $type = ">";
else if ( result == 5 ) $type = input ( "指定してください" );
else {
#re = result;
$type = " TYPE=\"" + $ty[#re] + "\">";
}
return $type;
type3:
title "番号付きの箇条書きを作る - こだマクロ";
$type[0] = "無指定";
$type[1] = "(&I)大文字ローマ文字";
$type[2] = "(&i)小文字ローマ文字";
$type[3] = "(&A)大文字アルファベット";
$type[4] = "(&a)小文字アルファベット";
$type[5] = "(&1)通常の数字";
$type[6] = "任意指定";
$ty[2] = "I";
$ty[3] = "i";
$ty[4] = "A";
$ty[5] = "a";
$ty[6] = "1";
menuarray $type,7;
if ( result == 1 ) $type = "";
else if ( result == 7 ) $type = input ( "指定してください" );
else {
#re = result;
$type = " TYPE=\"" + $ty[#re] + "\"";
}
return $type;
zenkaku:
writeinistr hidemarudir + "\\htmini.txt" , "Zenkaku" , "line" , $$1;
execmacro getinistr ( hidemarudir + "\\htmini.txt" , "Topmenu" , "macropath" ) + "htmzen.mac";
$out = getinistr ( hidemarudir + "\\htmini.txt" , "Zenkaku" , "line" );
writeinistr hidemarudir + "\\htmini.txt" , "Zenkaku" , "line" ,0;
return $out;
line:
$lia1 = $$2;
execmacro getinistr ( hidemarudir + "\\htmini.txt" , "Topmenu" , "macropath" ) + "kodaline.mac";
#line = getininum ( hidemarudir + "\\htmini.txt" , "Line" , "line" );
#i = 0;
while ( #line > #i ){
if ( #i == 0 ) $lia1 = $$2;
else $lia1 = $$3;
$line = $line + $lia1 + getinistr ( hidemarudir + "\\htmini.txt" , "Line" , str ( #i ) ) + "\n";
writeinistr hidemarudir + "\\htmini.txt" , "Line" , str ( #i ) , 0;
#i = #i + 1;
}
$line = leftstr ( $line , strlen ( $line ) - 1 );
if ( ##1 == 1 && $line == "" ) $line = $lia1 + $line;
return $line;