|
改良版です。(今度こそ大丈夫)
loaddll "tkinfo.dll";
$account = dllfuncstr("CurrentAccount");
$path = dllfuncstr("HomeDir") + $account + "\\filter.txt";
#n = dllfunc("SetAutoPushTimerMilli", 1, "");
#n = dllfunc("NewMail");
#n = dllfunc("StopAutoPushTimer");
gofiletop;
beginsel;
gofileend;
delete;
#n = dllfunc("SwitchHeaderView", 0);
insertfile $path;
replaceallfast "^\\t.*\\n", "", regular, casesense;
replaceallfast "\\t.*$", "", regular, casesense;
gofiletop;
#listhidemaru = hidemaruhandle(0);
#n = dllfunc("SetAutoPushTimerMilli", 1, "");
#n = dllfunc("NewMail");
#n = dllfunc("StopAutoPushTimer");
gofiletop;
beginsel;
gofileend;
delete;
#n = dllfunc("SwitchHeaderView", 0);
insertfile dllfuncstr("HomeDir") + "filterlog.txt";
#loghidemaru = hidemaruhandle(0);
call RegularEncode $account;
$accountencode = $$return;
while(1) {
setactivehidemaru #listhidemaru;
golinetop2;
#x = x; #y = y;
golineend2;
$find = gettext( #x, #y, x, y );
if( $find == "" ) {
break;
}
call RegularEncode $find;
$find = $$return;
$date = "";
setactivehidemaru #loghidemaru;
gofileend;
searchup "\\t" + $accountencode + "\\t.+(ヒット|合成)\\([0-9]+\
\):"
+ $find + "\\t", regular;
if( result == yes ) {
golinetop2;
$date = gettext( 0, y, 10, y );
}
setactivehidemaru #listhidemaru;
golineend2;
if( $date != "" ) {
insert "\t" + $date;
} else {
insert "\t見つからず";
}
golineend2;
right;
if( !result ) {
break;
}
golinetop2;
}
closehidemaruforced #loghidemaru;
gofiletop;
message "検索完了";
endmacro;
RegularEncode:
$$result = "";
##i = 0;
while(1) {
$$c = wcsmidstr( $$1, ##i, 1 );
if( $$c == "" ) {
break;
}
if( $$c == "\\"
|| $$c == "["
|| $$c == "]"
|| $$c == "."
|| $$c == "*"
|| $$c == "+"
|| $$c == "("
|| $$c == ")"
|| $$c == "^"
|| $$c == "|"
|| $$c == "$"
|| $$c == "\"" ) {
$$result = $$result + "\\" + $$c;
} else if( $$c == "@" ) {
$$result = $$result + "(@|\x7F)";
} else {
$$result = $$result + $$c;
}
##i = ##i + 1;
}
return $$result;
|
|