|
現在選択してるメールに対して処理するマクロとしては、以下のようになりま
す。
loaddll "tkinfo.dll";
#c = dllfunc("CountCurrentHeader", "X-Attach:");
if( #c > 0 ) {
#i = #c;
#done = 0;
while( #i > 0) {
#i = #i - 1;
$path = dllfuncstr("HomeDir") + dllfuncstr("CurrentAccount")
+ "\\"
+ dllfuncstr("CurrentHeader2", "X-Attach:", #i);
if( ! existfile( $path ) ) {
if( ! #done ) {
#n = dllfunc("BeginEditMail");
#done = 1;
}
#n = dllfunc("DeleteHeader2", "X-Attach:", #i);
}
}
if( #done ) {
#n = dllfunc("SaveEditMail", 0, 0);
}
}
でもって、特定の人からのメールに限って処理するってことであって、例えば
その人からのメールを特定のフォルダに振り分けてるってことであれば、
loaddll "tkinfo.dll";
if( dllfunc("RecvMailCountShow") == 0 ) {
endmacro;
}
$account = dllfuncstr("CurrentAccount");
$folder = dllfuncstr("CurrentFolder");
#n = dllfunc("SelectFolder", "特定アカウント", "特定フォルダ");
if( dllfunc("RecvMailCountInFolder") != 0 ) {
while( dllfunc("SelectRecvMailInFolder") ) {
//
// 先ほどのマクロの処理
//
}
}
#n = dllfunc("SelectFolder", $acount, $folder);
のようにして、受信が一段落してから自動起動したらいいかと思います。
|
|