|
runexで「dir /a-d /b」ってコマンドを実行するとファイル名一覧が取得できるので、そこから1つ1つファイルを開いてマクロ実行するってタイプのマクロを一回作ってみました。
execmacro "test2.mac"の所は適当に直さないといけないですけども。
かなりシンプルかと思いますけども。
runex "cmd.exe /c dir /a-d /b"
, 1 //sync 0:async, 1:sync
, 0, "" //stdin 0:none, 1:auto, 2:<file, 3:(reserved),
// 4:current content, 5:selection
, 4, "" //stdout 0:none, 1:auto, 2:>file 3:>>file, 4:new window,
// 5:insert, 6:replace, 7:>output pane, 8:>>output pane
, 0, "" //stderr 0:none, 1:auto or >>stdout, 2-8:same as stdout's param
, 0, "" //folder 0:none, 1:current, 2:specify 3:(reserved), 4:exe's
, 1 //show 0:auto, 1:show, 2:hide, 3-13:ShellExecute()'s SW_*
, 1 //draw 0:draw, 1:no draw when stdout redirected
, 0 //encode 0:ansi, 2:utf-16, 6:utf-8
, 0 //extended flags
;
config "xAutoAdjustOrikaeshi:2";
gofiletop;
#base = hidemaruhandle(0);
while( code != eof ) {
$filename = gettext( 0, y, 999, y );
openfile $filename;
message $filename;
execmacro "test2.mac";
#handle = hidemaruhandle(0);
setactivehidemaru #base;
closehidemaru #handle;
down;
}
message "終了。この内容(ファイル一覧)は閉じてください。";
|
|