使用OS X 10.9
Maverick
,我正在尝试撰写AppleScript
通知事件。
我已使用此代码成功发送了标题和副标题:
set emailFrom to "Johnny Appleseed"
set emailTitle to "The Email Subject"
set emailMessage to "Hello, this is a test"
display notification with title emailFrom subtitle emailTitle
我正在尝试显示emailFrom,emailTitle和emailMessage,因此它的格式如下:
AppleScript Notification Center文档仅讨论标题和副标题。
我尝试将message
添加到显示通知中,但它没有奏效。
set emailFrom to "Johnny Appleseed"
set emailTitle to "The Email Subject"
set emailMessage to "Hello, this is a test"
display notification with title emailFrom subtitle emailTitle message emailMessage
如何在通知中添加“消息”部分?
答案 0 :(得分:7)
以这种方式尝试:
display notification "Notification Text" with title "Title" subtitle "SubTitle"
=>
set emailFrom to "Johnny Appleseed"
set emailTitle to "The Email Subject"
set emailMessage to "Hello, this is a test"
display notification emailMessage with title emailFrom subtitle emailTitle