マクロの例(宛先が社外なら確認メッセージを表示する例)
loaddll "tkinfo.dll";
$to = dllfuncstr("CurrentHeaderUnited", "To");
$cc = dllfuncstr("CurrentHeaderUnited", "Cc");
$bcc = dllfuncstr("CurrentHeaderUnited", "Bcc");
$dest = $to + "," + $cc + "," + $bcc;
#destCount = dllfunc("CountEmailList", $dest );
#i = 0;
#found = 0;
while( #i < #destCount ) {
$email = dllfuncstr("GetEmailList", $dest, #i);
$email = dllfuncstr("SetEmailOnly", $email);
$email = dllfuncstr("ToLower", $email);
if( $email != "" ) {
if( rightstr( $email, 14 ) != "@mycompany.com" ) {
#found = 1;
break;
}
}
#i = #i + 1;
}
if( #found ) {
#n = dllfunc("Bypass_MessageBox", hidemaruhandle(0)
, "社外にメールを送ろうとしています。よろしいですか?"
, "社外メールの確認"
, 0x30 + 3 + 0x100);
if( #n != 6 ) {
#n = dllfunc("SetCancel", 1);
}
}