将消息的内容设置为在 applescript 中有多行

Set theMessage's content to have multiple lines in applescript

在自动化服务中,我有一个 bash 脚本,它将两个变量传递给 applescript,然后将它们输入到电子邮件中。我希望这两个变量在电子邮件中位于不同的行。

on run {input, parameters}
set macPath to item 1 of input
set windowsPath to item 2 of input
set messageContent to macPath & return & linefeed & return & windowsPath

tell application "Microsoft Outlook"
    activate
    set theMessage to make new outgoing message with properties {content:messageContent}
    open theMessage
end tell
end run

我试过 return、换行符和转义符,但 none 似乎有效,而且我的邮件内容总是在一行中结束。有没有办法在 applescript 中做到这一点?

我刚刚意识到 content 属性 支持 "rich text" 因此可以使用 <br> 标记引入换行符,例如:

tell application "Microsoft Outlook"
    activate
    set sendToAddress to ""
    set theMessage to make new outgoing message with properties {content:"Line 1 <br> line 2"}
    open theMessage
end tell