|
一応マクロ作ってみましたけど、こんなんでいいのやら?
gofiletop;
while(1) {
searchdown2 "<ol>", nocasesense;
if( !result ) {
break;
}
#xStart = x; #yStart = y;
searchdown "</ol>", nocasesense;
if( !result ) {
break;
}
if( selecting ) {
escape;
}
right 5;
beginsel;
moveto #xStart, #yStart;
$text = gettext( seltopx, seltopy, selendx, selendy, 1 );
loaddll "hmjre.dll";
#number = 1;
while(1) {
$new = dllfuncstr("ReplaceRegularNoCaseSense"
, "<li>"
, $text
, 0
, str(#number) + ". "
, 0
);
if( $new == "" ) {
break;
}
$text = $new;
#number = #number + 1;
}
$text = dllfuncstr("ReplaceRegularNoCaseSense"
, "</li>", $text, 0, "", 2);
$text = dllfuncstr("ReplaceRegularNoCaseSense"
, "<ol>", $text, 0, "", 2);
$text = dllfuncstr("ReplaceRegularNoCaseSense"
, "</ol>", $text, 0, "", 2);
delete;
insert $text;
}
|
|