使用 Applescript 创建智能邮箱?
我正在尝试使用基于当前所选消息的标准在 Apple Mail 中自动创建智能邮箱(例如,创建一个文件夹来显示发送当前消息的人的所有消息)。显然,我可以手动创建一个智能邮箱,但因为我经常这样做,所以我希望将其自动化。
我在邮件词典中找不到任何有关智能邮箱的参考。我进行了互联网搜索,但找不到任何用于在 Applescript 中操作智能邮箱的示例代码,只有 2006 年的讨论中的参考资料表明(线程底部)这是无法完成的: http://forums.macosxhints.com/archive/index.php/t-51935.html
我还找到了一个脚本来打开创建智能邮箱对话框,但这不是我想要的。
有人知道是否有办法在 AppleScript 中创建/编辑智能邮箱?
谢谢。
I am trying to automate the creation of a smart mailbox in Apple Mail using criteria based on the currently selected message (e.g. create a folder to display all messages from the person who sent the current message). Clearly, I can go in and create a smart mailbox by hand, but because I do this regularly I am hoping to automate it.
I could not find any reference to Smart Mailboxes in the Dictionary for Mail. I did an internet search and could not find any sample code for manipulating Smart Mailboxes in Applescript, only a reference in a discussion from 2006 that says (bottom of the thread) that it can't be done: http://forums.macosxhints.com/archive/index.php/t-51935.html
I also found a script to bring up the create smart mailbox dialog, but that's not what I'm looking for.
Anyone know if there's a way to create/edit a smart mailbox in AppleScript?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须使用 GUI 脚本。我使用 Python + appscript 完成大部分脚本编写,但这里有一个用于创建智能邮箱的快速 Applescript 片段。我应该指出,没有正式的 Applescript 支持来处理智能邮箱是可笑的。
结束告诉
You have to use GUI scripting. I do most of my scripting using Python + appscript but here's a quick Applescript fragment to create a Smart Mailbox. I should note that not having formal Applescript support for handling smart mailbox is ludicrous.
end tell