使用AppleScript设置传出消息的消息签名

使用AppleScript设置传出消息的消息签名,applescript,signature,macos-sierra,apple-mail,Applescript,Signature,Macos Sierra,Apple Mail,因为我安装了Sierra,所以我无法获得一个以前可以工作的AppleScript 我正在尝试创建一条带有签名的邮件(在Apple Mail中),但不断出现错误 我过去常常这样创建/填充消息: set msg to make new outgoing message with properties {content:messageContent} set message signature of msg to signature "X" 在Sierra完成此操作之前,现在我收到一个错误消息:Ma

因为我安装了Sierra,所以我无法获得一个以前可以工作的AppleScript

我正在尝试创建一条带有签名的邮件(在Apple Mail中),但不断出现错误

我过去常常这样创建/填充消息:

set msg to make new outgoing message with properties {content:messageContent}
set message signature of msg to signature "X"
在Sierra完成此操作之前,现在我收到一个错误消息:
Mail出错:AppleEvent处理程序失败。

因此,我尝试了几种方法,最终(使用AppleScript字典)得到了:

最后出现了一个错误,提示:
Mail出现错误:无法生成类传出消息。


有谁能帮我解决这个问题吗

这是一个已知的错误。我也有同样的问题


您在原始回复中也没有提到这是邮件。可能希望在以后的帖子中包含该应用程序

这是一个已知的错误。我也有同样的问题


您在原始回复中也没有提到这是邮件。可能希望在以后的帖子中包含该应用程序

我也遇到了同样的问题,并找到了一个可行的解决方案。在上周末我升级到Sierra 10.12.4之前,“按钮3”一直是“按钮2”

击键“F”,只是我签名名字的第一个字母。如你所愿修改它

try
    set message signature of theMessage to signature "your signature name"

on error

    tell application "Mail" to activate
    tell application "System Events"
        tell process "Mail"
            click pop up button 3 of window 1
            delay 0.01
            keystroke "F"
            delay 0.01
            keystroke return
            delay 0.01
        end tell
    end tell

end try

我也遇到了同样的问题,并找到了一个可行的解决方案。在上周末我升级到Sierra 10.12.4之前,“按钮3”一直是“按钮2”

击键“F”,只是我签名名字的第一个字母。如你所愿修改它

try
    set message signature of theMessage to signature "your signature name"

on error

    tell application "Mail" to activate
    tell application "System Events"
        tell process "Mail"
            click pop up button 3 of window 1
            delay 0.01
            keystroke "F"
            delay 0.01
            keystroke return
            delay 0.01
        end tell
    end tell

end try

好的,谢谢你的回答。我更新了我的问题提到苹果邮件,谢谢你指出这一点。好的,谢谢你的回答。我更新了我的问题提到苹果邮件,谢谢你指出这一点。