是的,AppleScript会更加灵活。在你的Automator流程,添加一个动作“运行AppleScript”和替换脚本:
on run {input, parameters}
set My_Destinataire to "[email protected]" -- assign here the email address
set Wday to first word of date string of (current date) -- get the days of the week in local language
if Wday is in {"Saturday", "Sunday"} then -- fill subject and content for week end
set My_Subject to "we are " & Wday & " !"
set My_Content to "this email is for next upcoming week…"
else -- fill subject and content with message for working days
set My_Subject to "we are " & Wday & ", an other working day !"
set My_Content to "this email is for current week…"
end if
tell application "Microsoft Outlook" -- creation of the new email itself
activate
set NewMessage to make new outgoing message with properties {subject:My_Subject, content:My_Content}
make new recipient at NewMessage with properties {email address:{name:"", address:My_Destinataire}}
send newMessage -- if you want to send the message directly without checking it
end tell
return input
end run
您必须调整“输入”的电子邮件地址通过,则必须调整主题/内容字符串中你需要什么工作日和周末。
是的,原始的Applescript是要走的路。我很惊讶,你找不到如何获得今天的日期的例子,2.比较你的目标日期,3.在Outlook中创建新的电子邮件与给定的主题和正文内容 – jweaks