【问题标题】:AppleScript with Mail, reply to email, can't set contentAppleScript with Mail,回复电子邮件,无法设置内容
【发布时间】:2015-02-23 11:01:57
【问题描述】:

我可以在 Mail 中正确地创建一个全新的外发邮件,并设置它的正文。

但是,当我尝试使用replyOpeningWindow:replyToAll: 方法(在现有邮件上调用)时,我无法设置内容。在结果 MMOutgoingMessage 上调用 setContent: 似乎什么也没做,消息的内容仍然是我正在回复的消息的引用文本。

是否有人成功使用replyOpeningWindow:replyToAll:,然后更改了生成的电子邮件的属性?

编辑添加:

此问题不是脚本桥问题。这个 AppleScript 也会出现同样的问题:

tell application "Mail"
    copy first message of inbox to emailMessage
    set replyMessage to reply emailMessage without opening window
    set content of replyMessage to "Hello"
    set visible of replyMessage to true
end tell

【问题讨论】:

  • 有趣的是,我刚刚在 MacOS 10.12 中尝试过这个 AppleScript 代码,它可以工作。其他人可以确认这是固定的吗?

标签: objective-c cocoa applescript scripting-bridge


【解决方案1】:

我也有这个问题。如果您在设置内容之前添加延迟,它会起作用。

tell application "Mail"
copy first message of inbox to emailMessage
set replyMessage to reply emailMessage without opening window
delay 0.1
set content of replyMessage to "Hello"
set visible of replyMessage to true
end tell

【讨论】:

    【解决方案2】:

    您无法更改回复消息的某些属性,包括内容。

    【讨论】:

    • 你知道这是否记录在任何地方吗? (我不认为你错了,但很高兴知道这是一个错误还是故意的!)
    • 除了几年来论坛中的许多投诉外,我还没有看到它记录在案。
    猜你喜欢
    • 1970-01-01
    • 2013-12-31
    • 2013-02-08
    • 2013-04-03
    • 1970-01-01
    • 2011-06-01
    • 2013-06-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多