我想使用AppleScript阻止垃圾邮件发送者的地址。
选择收件箱消息后,我执行此脚本:
tell application "System Events"
click menu item "Block Sender" in menu item "Junk Mail" in menu bar item "Message" in menu bar 1 of application process "Microsoft Outlook"
end tell
导致此错误:
系统事件出错:无法获取菜单项"垃圾邮件"菜单 bar item" Message"申请流程的菜单栏1" Microsoft 前景"
Junk Mail
菜单有一个子菜单:
AppleScript编辑器已被授予访问权限以控制我的电脑:
我错过了什么?
答案 0 :(得分:0)
我无法用Outlook测试它,但您错过了菜单项的“消息”和“垃圾邮件”菜单:
tell application "System Events"
click menu item "Block Sender" in menu "Junk Mail" in menu item "Junk Mail" in menu "Message" in menu bar item "Message" in menu bar 1 of application process "Microsoft Outlook"
end tell