是的,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