|
Sumiさん,こんばんは。
>変換リストによる連続置換Ver2.11と置換マクロVer3.00は、いつも使わせて頂
>き大変重宝しております。
これらのマクロはその後細かな修正をしています。よろしければ,
http://www.rinku.zaq.ne.jp/bkbux003/sansui.html
をご覧ください。
今回のご要望のことは置換マクロのカスタマイズというより,特定の語の挿入
ですので,別のマクロで対処した方がいいと思いいます。
次のようなマクロでとりあえずお試しください。その上で何か問題点,不足す
る機能などありましたらご指摘ください。
//---------AddArticle.mac -----------------------------------//
#bx = x; #by = y;
#ime = imestate;
if( #ime ) imeswitch;
$word = input( "置換対象語" );
if( $word == "" ) endmacro;
#count = 0;
disabledraw;
while( 1 ) {
searchdown $word, hilight; //検索語強調
// searchdown $word; //強調しない
if( !result ) break;
#count = #count + 1;
escape;
$top = char( code );
if( #count == 1 ) {
if( strstr( "aiueoAIUEO", $top ) < 0 ) $article = " a ";
else $article = " an ";
} else $article = " the ";
insert $article;
}
moveto #bx, #by;
enabledraw;
message str(#count) + " 個挿入しました";
if( #ime ) imeswitch;
endmacro;
//-------------------------------------------------------------//
では, (^^)/~
山紫水明
SANSHISUIMEI
|
|