使用Alfred Workflow中的动态字段在Mail.app中创建新电子邮件

时间:2017-08-21 20:16:44

标签: applescript alfred

我想在我的Alfred Workflow中添加动态日期,但无法弄清楚。这是我到目前为止所得到的:

    tell application "Mail"
    activate
    make new outgoing message with properties {subject:"some subject", content:"some content" & return & return}
    end tell

我想在主题中包含动态日期,并在内容中包含Alfred片段,但它们未被识别。例如:

    tell application "Mail"
    activate
    make new outgoing message with properties {subject:"{date} Call Follow Up", content:"some content" & return & return}
    end tell

这有意义吗?任何帮助将不胜感激!

2 个答案:

答案 0 :(得分:1)

我不确定我是否理解你的问题。

你想要完成这样的事吗?

set mySubject to ((current date) as text) & " Call Follow Up"

tell application "Mail"
    activate
    make new outgoing message with properties {subject:mySubject, content:"some content" & return & return}
end tell

答案 1 :(得分:1)

显然,您无法在“运行脚本”工作流对象中访问Alfred变量。所以,你可以这样做: 1.添加代码段对象 2.连接一个关键字输入对象 3.使用以下代码连接运行脚本对象:

repo.findOne()