【发布时间】:2012-02-17 20:58:49
【问题描述】:
我正在使用带有 Mail.app 规则的以下脚本。
似乎在我的计算机上,将邮件移动到垃圾箱后,代码没有被执行。 (下面的 adayzdone 报告它对他有用)。
我怎样才能找出这个问题的原因并解决它?
using terms from application "Mail"
on perform mail action with messages theMessages
repeat with eachMessage in theMessages
set theText to content of eachMessage
--
-- ... here happens some processing
--
-- this works:
move eachMessage to mailbox "Trash"
-- but this doesn't:
display dialog "reached this point"
-- i.e. additional code I'm adding here isn't executed...
end repeat
end perform mail action with messages
end using terms from
【问题讨论】:
-
讨论了一个相关的探测问题over here。您是否碰巧在 Mail.app 中配置了多个帐户?
-
尝试将
move eachMessage...行包装在try...on error块中。您可以使用do shell script "logger -t 'Your script name' " & whateverTextYouLike将错误消息记录到控制台。
标签: applescript