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

Posted on Nov 16, 2020 5:36 AM

Reply
10 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Script for closing an application's window in Mac OS Big Sur

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.