Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on run {input, parameters}
- tell application "System Events"
- tell process "NotificationCenter"
- copy windows to notifications
- repeat with notification in notifications
- set btnNames to {}
- set btnName to "OK"
- set n to number of notification
- repeat with btn in buttons of notification
- set btnName to name of btn
- set end of btnNames to btnName
- end repeat
- set answer to display dialog "Notification " & n buttons btnNames default button btnName
- repeat with btn in buttons of notification
- if button returned in answer is equal to name of btn then
- click btn
- end if
- end repeat
- end repeat
- end tell
- end tell
- end run
Add Comment
Please, Sign In to add comment