AppleScript的展望 - 设置回复内容 [英] Applescript Outlook - setting content of reply

查看:176
本文介绍了AppleScript的展望 - 设置回复内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个AppleScript的点击时,回复一个选中的邮件,并添加特定的信息作为内容:

I want to create an Applescript that when clicked on, replies a selected mail and adds a specific Message as the content:

这部分工作:

tell application "Microsoft Outlook"
   set replyMessage to selection
   set replyMessageSubj to subject of replyMessage
   reply to replyMessage with opening window
end tell

但是,当我写这篇文章:

But when I write this:

tell application "Microsoft Outlook"
   set replyMessage to selection
   set replyMessageSubj to subject of replyMessage
   reply to replyMessage with opening window
   set content of replyMessage to "Hello"
end tell

,我想回复原始邮件的内容是由你好所取代。
我一直没能找到一个简单的例子来把我在正确的方向。

The content of the original message that I wanted to reply to is replaced by that "Hello". I haven't been able to find one single example to put me in the right direction.

我把答复部分来自另一个话题,但没有一个提到这种格式的内容,其它格式的我已经能够添加的内容,但不回复的部分。

I took the reply part from another topic, but there isn't one that mentions the content with this format, in other formats I have been able to add the content, but not the reply part.

感谢您的帮助。

推荐答案

感谢您的帮助adamh!

Thanks for the help adamh!

这是解决方案:

tell application "Microsoft Outlook"
set replyToMessage to selection
set mymessage to "Aqui se trapeo con jerga"
set OldContent to content of replyToMessage
if (replyToMessage is "") then
    log ("NOTHING SELECTED!")
    return
end if
set replyMessageSubj to subject of replyToMessage
set replyMessage to reply to replyToMessage without opening window
if has html of replyMessage then
    log ("HTML!")
    set the content of replyMessage to "Hello World<br> This is an HTML test<br><br><br><hr>" & OldContent
else
    log ("PLAIN TEXT!")
    set the content of replyMessage to "Hello World<br> This is a plain text test <br><br><br><hr>" & OldContent
end if
open replyMessage
end tell

这篇关于AppleScript的展望 - 设置回复内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆