Applescript将剪贴板文本粘贴到消息中并发送到电子邮件

时间:2013-10-29 18:14:25

标签: applescript

标题说明了一切。

我是对应用程序的新手,我希望有人能够解释如何

将剪贴板文本粘贴到消息中并使用applescript发送给用户。

此外,如果您知道如何发送图像附件而不是剪贴板文本,这将是惊人的,我真的很感激

1 个答案:

答案 0 :(得分:0)

set clipContent to (the clipboard as text)

tell application "Mail"
    set myMessage to make new outgoing message at the beginning of outgoing messages with properties {subject:"Clipboard Content"}

    tell myMessage to make new to recipient at beginning of to recipients with properties {address:"first@email.com, second@email.com"}
    set myMessage's content to clipContent
    set myMessage's visible to true
    activate

    -- Uncomment the line below to send the message
    --send myMessage
end tell