|
すみません。先ほどのマクロはバグがありました。
バグ修正して、さらにもうちょっと改良しました。
このマクロでどうでしょ?
この内容のマクロファイル(例えばprint.macとかの名前のファイル)を作成
して、「マクロ・マクロ実行...」から「参照」ボタンを押して選択して実行し
てみて欲しいです。
#x = x;
#y = y;
#readonly = readonly;
if( #readonly ) readonlyswitch;
#browsemode = browsemode;
if( #browsemode ) browsemodeswitch;
openreg "CURRENTUSER", "Software\\Hidemaruo\\TuruKame\\Config";
$headerrecv = getregstr("SmallHdrRecv_Backup$$$");
if( $headerrecv == "" ) {
$headerrecv = getregstr("SmallHdrRecv");
}
$headersend = getregstr("SmallHdrSend_Backup$$$");
if( $headersend == "" ) {
$headersend = getregstr("SmallHdrSend");
}
$printheader = "Subject:\x01\x02From:\x01\x02Date:\x01\x02";
writeregstr "SmallHdrRecv", $printheader;
writeregstr "SmallHdrSend", $printheader;
writeregstr "SmallHdrRecv_backup$$$", $headerrecv;
writeregstr "SmallHdrSend_backup$$$", $headersend;
closereg;
loaddll "tkinfo.dll";
#n = dllfunc("ExecAtMain", "EnvChangedDanger");
#headerview = dllfunc("HeaderView");
if( #headerview != 1 ) {
#n = dllfunc("SwitchHeaderView", 1);
}
if( dllfunc("IsHidemaruMailMain") ) {
#n = dllfunc("EnterPrintMulti");
} else {
if( #headerview == 1 ) {
#n = dllfunc("SwitchHeaderView", 0);
#n = dllfunc("SwitchHeaderView", 1);
}
}
#readonly = readonly;
if( #readonly ) readonlyswitch;
#browsemode = browsemode;
if( #browsemode ) browsemodeswitch;
begingroupundo;
moveto 0, -9999;
while(1) {
searchdown "^Date: [^ ]", regular, casesense;
if( !result ) {
break;
}
if( (colorcode & 0x1F) != 3 ) {
continue;
}
$date = gettext( 10, y, 256, y );
$date = dllfuncstr("FormatDate", $date, "YYYY/MM/DD(W曜日) hh:mm:ss");
moveto 10, y;
beginsel;
golineend2;
delete;
insert $date;
}
endgroupundo;
print 1;
undo;
if( #readonly ) readonlyswitch;
if( #browsemode ) browsemodeswitch;
loaddll "tkinfo.dll";
if( dllfunc("IsHidemaruMailMain") ) {
#tmp = dllfunc("LeavePrintMulti");
}
openreg "CURRENTUSER", "Software\\Hidemaruo\\TuruKame\\Config";
writeregstr "SmallHdrRecv", $headerrecv;
writeregstr "SmallHdrSend", $headersend;
writeregstr "SmallHdrRecv_backup$$$", "";
writeregstr "SmallHdrSend_backup$$$", "";
closereg;
#shellobj = createobject("WScript.Shell");
if(#shellobj != 0){
callmethod #shellobj, "RegDelete"
, "HKCU\\Software\\Hidemaruo\\TuruKame\\Config\\SmallHdrRecv_bac
kup$$$";
callmethod #shellobj, "RegDelete"
, "HKCU\\Software\\Hidemaruo\\TuruKame\\Config\\SmallHdrSend_bac
kup$$$";
releaseobject #shellobj;
}
loaddll "tkinfo.dll";
#n = dllfunc("ExecAtMain", "EnvChangedDanger");
if( #headerview == 1 ) {
#n = dllfunc("SwitchHeaderView", 0);
}
#n = dllfunc("SwitchHeaderView", #headerview);
moveto #x, #y;
|
|