我有一个邮件过滤器,它将运行一个自动脚本,该脚本将复制邮件内容,然后运行一个 Automator 应用程序。但是它不起作用。它不会启动 Automator 应用程序或复制内容。
所以我收到了一封电子邮件,它告诉这个 Applescript 运行。如果我进入并编辑 AppleScript(即使 24 小时后没有关闭,只有睡眠)并删除除最后一行之外的所有内容,然后单击保存 AppleScript 会启动应用程序。我感觉第一段代码有问题。当电子邮件进来时,我将 Mail 设置为发出声音,运行脚本并删除电子邮件,所以我知道脚本被告知运行。
- 如何删除电子邮件文件?
- 为什么只有在 AppleScript 编辑器中打开 AppleScript 后才会运行它的错误?这真的很愚蠢。
这是下面的当前 Applescript:
using terms from application "Mail"
on perform mail action with messages matchmsgs for rule mailrule
tell application "Mail"
set msg to item 1 of matchmsgs
set msgcontent to (content of msg) as Unicode text
end tell
set the clipboard to msgcontent
tell application "/Users/me/Docs/Update App.app" to activate
end perform mail action with messages
end using terms from