0

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

    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

那有意义吗?任何帮助将非常感激!

4

2 回答 2

1

显然,您无法访问 Run Script 工作流对象中的 Alfred 变量。因此,您可以执行以下操作: 1. 添加片段对象 2. 将关键字输入对象连接到它 3. 使用以下代码连接运行脚本对象:

on run argv
  set theQuery to item 1 of argv
    set theSubject to date string of (current date) & " Call Follow up"
    tell application "Mail"
    activate
    make new outgoing message with properties {subject:theSubject, content:theQuery & return & return}
end tell
end run
于 2017-08-22T00:47:40.303 回答
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
于 2017-08-21T21:38:00.617 回答