|
kendoさん,こんばんは。
次のようなマクロでうまくいきますか?
//----------------------------------------------//
//Macro1
$k = input("記号は?");
$ps = input("数字の前のスペース");
$rs = input("数字の後ろのスペース");
gofiletop;
#i = 1;
while( 1 ) {
searchdown $k;
if(!result) break;
delete;
insert "(" + $ps + str(#i) + $rs + ")";
#i = #i + 1;
}
endmacro;
//----------------------------------------------//
//----------------------------------------------//
//Macro2
call Change_search;
$k1= "【";
$k2= "】";
$ps = input("数字の前のスペース");
$rs = input("数字の後ろのスペース");
gofiletop;
#i = 1;
while( 1 ) {
searchdown $k1 + "[^" + $k2 + "]+" + $k2, regular;
if( !result ) break;
cut;
insert "(" + $ps + str(#i) + $rs + ")";
#i = #i + 1;
}
gofileend;
insert "\n";
while( #i > 1 ) {
insert "\n";
up;
poppaste;
golinetop;
delete;
golineend;
backspace;
golinetop;
#i = #i - 1;
}
call Reset_search;
endmacro;
Change_search: //検索状態を変更
if ( !searchmode ) { // 検索状態を範囲選択に変更
openreg "CURRENTUSER", "Software\\Hidemaruo\\Hidemaru\\Env";
writeregnum "SelectFound", 1;
#modechanged = 1;
envchanged;
}
#searchoption = searchoption;
$searchbuffer = searchbuffer;
return;
Reset_search: //検索状態を元に戻す
if ( #modechanged ) {
writeregnum "SelectFound", 0;
envchanged;
closereg;
}
setsearch $searchbuffer, #searchoption;
return;
//----------------------------------------------//
では, (^^)/~
山紫水明
|
|