Script for closing an application's window in Mac OS Big Sur
Hey!
Recently I used this script for closing windows on my Mac:
tell application "System Events"
tell process "Application"
click button 1 of window 1
end tell
end tell
But now it doesn't work. Can anybody suggest any way to close windows through the scripts?
MacBook Pro 15″, macOS 11.0