2011年12月7日 11:10 pm #10833
Keymaster
naru 様
いつも EmEditor Professional をお使いいただき、誠にありがとうございます。
以下のような感じでイメージしていただければと思いました。マクロ ファイルは、少なくとも 2 個以上必要になり、共通関数を別のファイルに書くとすると、それを #include するため、合計 3 個になります。
EmEditor が終了されるときのイベント:
on_exit.jsee:
#include “common.jsee”
docs = new Enumerator( editor.Documents );
for( ; !docs.atEnd(); docs.moveNext() ){
doc = docs.item();
// アクティブな文書でない場合のみ実行
if( doc != editor.ActiveDocument() ){
Func( doc );
}
}
ファイルを閉じるときのイベント:
on_close.jsee:
#include “common.jsee”
doc = editor.ActiveDocument();
Func( doc );
共通関数:
common.jsee
function Func( …. )
….
今後もどうぞよろしくお願い申し上げます。