It seems like the following AppleScript is no longer working in the latest version of the OS X 10.10 (Yosemite):
on run tell application "System Events" tell process "Notification Center" set theseWindows to every window display notification (count of theseWindows) end tell end tell end run
This were supposed to get all notifications listed in the Notification Center. However, the count attribute always returns 0.
Does anyone know how to retrieve all notifications in the Notification Center different than the script above?