| |
VBASPCoderさん、こんにちは。
>現在ASPを秀丸でプログラミングしております。VBScriptで作成しておりますが、選
>択したすべての行をコメントにするマクロなどあればいいなあと思っております。
下記場所にいろいろなマクロが登録されているので、自分にあったマクロをご使用さ
れると良いとおもいます。
秀まるおさんHP 秀丸エディタのマクロライブラリ
http://hidemaru.xaxon.co.jp/lib/macro/index.html
私が使ってるのは、下記のようなカンタンなマクロです。
//--------------------------------------------------------------------------//
// マクロ名称 : COM.MAC //
// //
// 機能概要 : 選択した行の先頭に指定したキャラクタをPASTE //
// //
// 注意事項 : 特になし //
// //
// 作 成 者 : プックン 99.01.29 //
// //
// 修正履歴 : //
// 修正日 修正者 修正概要 //
// 2000.06.01 プックン マクロ実行後に検索文字列bufferを戻す機能を追加 //
// 2000.12.21 プックン メニューの修正 //
// ------------------------------------------------------------------------ //
$ver = "1.00";
$date = "2000.12.21";
$author = "プックン" ;
$info = "COM.MAC Ver "+$ver+ "\n最終更新日付:"+$date ;
$info = $info + "\n作者:"+$author;
//現在のカーソル位置を記憶
#x = x ; #y = y ;
if (!selecting) {
message "文字列追加プロセス:\n\n範囲選択してから実行してください。";
goto LEND;
}
//検索文字列を記憶しておく
$csrch = searchbuffer;
#osrch = searchoption;
while ( 1 ) {
menu "◆◆ コメントマーク ◆◆",
"( &1 ) /* */",
"( &2 ) > ",
"( &3 ) > ",
"( &4 ) -- ",
"( &5 ) // ",
"( &6 ) # ",
"( &7 ) その他 ",
"( &V ) Version ";
if ( result != 1) break;
}
if( result == 0 ) goto LEND ;
else if( result == 2 ) replaceallfast "^.+$", "/\* \\0 \*/", regular,ins
elect;
else if( result == 3 ) replaceallfast "^", ">", regular,inselect;
else if( result == 4 ) replaceallfast "^", ">", regular,inselect;
else if( result == 5 ) replaceallfast "^", "--", regular,inselect;
else if( result == 6 ) replaceallfast "^", "//", regular,inselect;
else if( result == 7 ) replaceallfast "^", "#", regular,inselect;
else if( result == 8 )
{ $other = input( "挿入する文字列の指定: " );
if ( result != 1 ) goto LEND;
replaceallfast "^", $other, regular,inselect;
}
else if( result == 9 ) {message $info ; goto LEND;}
//マクロ開始前の検索バッファに戻す
setsearch $csrch,#osrch ;
LEND:
moveto #x, #y ;
endmacro;
|
|