【发布时间】:2016-02-21 20:12:04
【问题描述】:
我正在尝试制作一个 AppleScript,它会在我收到特定电子邮件时创建通知。
规则已设置,我有一个脚本,它使用以下代码启动应用程序:
display notification "A newBuild is now available!" with title "New Build"
tell application "Safari"
activate
tell window 1
set current tab to (make new tab with properties URL:"https://latestSuccessful")
end tell
tell application "System Events"
set visible of process "Safari" to true
end tell
end tell
这将启动 safari 并在显示通知后立即进入网页。
理想情况下,我会将通知显示为警报,并在“显示”按钮上执行操作,然后将我带到网页。 “关闭按钮”自然会关闭警报。
这可能吗?提前感谢您的任何指点。
【问题讨论】: