我正在处理AppleScript,以下内容不起作用:
我已将该文件放在脚本文件夹中,创建了一条查找邮件的规则,但脚本永远不会发生。
我试图标记,改变背景颜色无济于事。规则“测试”存在。 这有什么不对?
代码:
using terms from application "Mail"
-- on perform mail action with messages selectedMessages
set today to current date
set deleteDate to today - (7 * days)
on perform mail action with messages selectedMessages for rule test
tell application "Mail"
repeat with eachMessage in selectedMessages
-- repeat with a from 1 to 5
--- Process the current message
-- set background color of eachMessage to white
-- if date received of eachMessage in selectedMessages is after deleteDate then
set background color of eachMessage to white
set flagged status to false
-- end if
-- display dialog theText
end repeat
end tell
end perform mail action with messages
end using terms from