【发布时间】:2011-01-30 08:42:16
【问题描述】:
我有一个邮件过滤器,它将运行一个自动脚本,该脚本将复制邮件内容,然后运行一个 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
【问题讨论】:
-
这是如何以及在哪里不起作用?
-
我将它保存在一个 AppleScript 中,并让 mail.app 程序在收到符合过滤器的电子邮件时运行它。编辑问题以包含一些细节...