|
とりあえず、メニューでどっち形式かを選択して表示するマクロを作ってみま
した。
両方の形式で開いて内容比較させるようなマクロも、やろうと思えば出来るよ
うな気はします。
loaddll "tkinfo.dll";
#n = dllfunc("SelectedMailCount");
if( #n != 1 ) {
message "メールを1通だけ選択して実行してください。";
endmacro;
}
if( hidemarucount != 1 ) {
message "エディタ・ウィンドウをすべて閉じてから実行してください。";
endmacro;
}
$home = dllfuncstr("HomeDir");
$tempfolder = $home + "TempMail";
if( ! existfile( $tempfolder ) ) {
#n = dllfunc("Bypass_CreateDirectory", $tempfolder );
}
$tempmail = $tempfolder + "\\$$$export$$$.eml";
if( existfile( $tempmail ) ) {
#n = dllfunc("Bypass_DeleteFile", $tempmail );
}
menu "text/plainパートを見る(&T)",
"text/htmlパートをテキストに変換して見る(&H)";
#action = result;
if( #action == 0 ) {
endmacro;
}
openreg "CURRENTUSER", "Software\\Hidemaruo\\TuruKame\\Config";
if( !result ) {
message "レジストリの参照に失敗しました。";
endmacro;
}
#htmlconv = getregnum( "HtmlConvFlags" );
#htmlconvPrev = #htmlconv;
#specialflags2 = getregnum( "SpecialFlags2" );
#specialflags2Prev = #specialflags2;
if( #action == 1 ) {
#htmlconv = #htmlconv & 0xFFFFFFF7;
#specialflags2 = #specialflags2 | 0x08000000;
} else {
#htmlconv = #htmlconv | 8;
#specialflags2 = #specialflags2 & 0xF7FFFFFF;
}
writeregnum "HtmlConvFlags", #htmlconv;
writeregnum "SpecialFlags2", #specialflags2;
closereg;
#n = dllfunc("EnvChangedDanger");
#n = dllfunc("Export", $tempmail, "mbox", "log", "", "truncate" );
openreg "CURRENTUSER", "Software\\Hidemaruo\\TuruKame\\Config";
writeregnum "HtmlConvFlags", #htmlconvPrev;
writeregnum "SpecialFlags2", #specialflags2Prev;
closereg;
if( ! existfile( $tempmail ) ) {
message "受信ログをエクスポートするのに失敗しました。";
endmacro;
}
runsync2 "turukame.exe /v \"" + $tempmail + "\"";
#n = dllfunc("Bypass_DeleteFile", $tempmail );
#handle = hidemaruhandle(1);
setactivehidemaru #handle;
if( dllfunc("IsHtmlMailViewerVisible") ) {
#n = sendmessage( hidemaruhandle(0), 0x111, 40336, 0);
}
endmacro;
|
|