将电子邮件正文传递给 AppleScript
我将 Mail 设置为在收到主题为“AppleScript”的电子邮件时执行 AppleScript,我想知道如何将此电子邮件的正文传递给脚本来执行。
提前致谢!
I have Mail set up to execute an AppleScript when it receives an email with the subject "AppleScript" and I was wondering how I could pass the body of this email to the script for execution.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
消息正文可以使用已传递给规则操作的消息的
content
属性来确定。要执行脚本,请使用run script
命令。以下脚本是如何编写可作为规则操作附加的 AppleScript 的示例,该规则操作会将消息正文作为 AppleScript 运行:
The body of a message can determined my using the
content
property of the message that has been passed to the rule action. To execute the script use therun script
command.The following script is an example of how to write an AppleScript that can be attached as a rule action that will run the body of the message as an AppleScript: