【发布时间】:2020-04-01 22:26:43
【问题描述】:
我正在尝试使用 AppleScript 读取 macOS 通知标题和副标题。我设法使用发布的示例here(编号 5)获得标题,但我还需要获得副标题。
这是返回标题的代码:
on run
tell application "System Events"
tell process "Notification Center"
set theseWindows to every window
set theseTitles to {}
repeat with thisWindow in theseWindows
try
set thisTitle to the value of static text 1 of thisWindow
set the end of theseTitles to thisTitle
end try
end repeat
return theseTitles
end tell
end tell
end run
有谁知道如何获取通知字幕?
【问题讨论】:
标签: macos applescript