我正在编写脚本以检查是否提交了特定的Web表单。AppleScript和Mail.app:检查新邮件是否包含字符串
剧本至今读取正是如此:
tell application "Mail"
check for new mail
set newmail to get the unread count of inbox
repeat with msg in newmail
if msg's subject contains "New newsletter built by" then
return msg's subject
end if
end repeat
end tell
我在我的收件箱中的脚本一起工作了未读电子邮件,但我仍然得到一个错误:
error "Mail got an error: Can’t make 1 into type specifier." number -1700 from 1 to specifier
任何将不胜感激。
干杯!
除非您收到的所有消息在不到十分之一秒,你的脚本将不能正确每次工作,因为'检查新邮件'命令不会等待,所以** Mail **将不会有时间登录到邮件服务器并检索任何待处理的邮件。 – jackjr300
解决方案在我的答案 – jackjr300