我写了一个简短的 Applescript 将选定的邮件移动到该邮箱的相关存档中。但是,当它运行时,不再有选择。(如果我然后按向上或向下,它会选择整个邮箱中的第一条或最后一条消息)。我不知道如何使用 AppleScript 在当前选择之外选择下一条消息。我真的不介意“下一个”是之前还是之后的消息,只要它在选择附近(即将消失)。
如果有帮助,这是我的 Applescript:
tell application "Mail"
set selectedMessages to selection
repeat with theMessage in selectedMessages
set theAccount to account of mailbox of theMessage
set read status of theMessage to true
set mailbox of theMessage to mailbox "_old" of theAccount
end repeat
end tell