Email Applescript邮件标记在maverick中不起作用?

Email Applescript邮件标记在maverick中不起作用?,email,applescript,osx-mavericks,Email,Applescript,Osx Mavericks,我正在编写applescript,但以下内容不起作用: 我已经将文件放在脚本文件夹中,创建了一个查找消息的规则,但脚本从未发生过 我试图标记,改变背景颜色,但没有用。规则测试已存在。 这里怎么了 代码: using terms from application "Mail" -- on perform mail action with messages selectedMessages set today to current date set deleteDate to today - (7

我正在编写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