I'm trying to read macOS notifications title and subtitle using AppleScript. I managed to get the title using the example posted here (number 5), but I also need to get the subtitle.
Here is the code that returns the title:
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
Does anyone know how I can get the notification subtitle?