|
ちゃんとしたマクロを作ってみました。
秀丸メール本体上で、1通選択して実行する用のマクロです。
loaddll "tkinfo.dll";
$html = dllfuncstr("CurrentHeader", "X-Html");
if( $html == "" ) {
endmacro;
}
$folder = dllfuncstr("HomeDir") + dllfuncstr("CurrentAccount")
+ "\\" + leftstr( $html, strlen($html) - strlen("index.htm") );
$file = $folder + "index.htm";
#n = dllfunc("Bypass_SetFileAttributes", $file, 0);
#n = dllfunc("Bypass_DeleteFile", $file );
#c = dllfunc("CountCurrentHeader", "X-Attach");
#i = 0;
while( #i < #c ) {
$name = dllfuncstr("CurrentHeader2", "X-Attach", #i);
#x = strstr( $name, "\\");
#x = strstr( midstr( $name, #x + 1, 999 ), "\\" ) + #x + 2;
$base = midstr( $name, #x, 999 );
$file = $folder + $base;
#n = dllfunc("Bypass_SetFileAttributes", $file, 0);
#n = dllfunc("Bypass_DeleteFile", $file );
#i = #i + 1;
}
$file = $folder + "$$$ReferenceCount$$$.$$$";
#n = dllfunc("Bypass_SetFileAttributes", $file, 0);
#n = dllfunc("Bypass_DeleteFile", $file );
#n = dllfunc("Bypass_RemoveDirectory", $folder);
#n = dllfunc("BeginEditMail");
#n = dllfunc("DeleteHeader", "X-Html");
#n = dllfunc("SaveEditMail", 0, 0);
#n = dllfunc("SetMailFlag", "altered", 0);
|
|