我是 applescript 的新手,在做一些看似非常基本的事情时遇到了巨大的麻烦。我正在尝试以带有附件的 RTF 格式保存选定的邮件。这是错误的脚本:
tell application "Mail"
activate
set AllMessages to selection
set myMessage to item 1 of AllMessages
open myMessage
tell application "System Events"
tell process "Mail"
tell menu bar 1
tell menu bar item "File"
tell menu "File"
click menu item "Save As…"
delay 2
keystroke "test"
click checkbox "Include Attachments" -- result: ERROR
end tell
end tell
end tell
end tell
end tell
end tell