close app window

I am trying to launch Calendar and immediately close the window that opens: It opens

calendar but does not close window. If I run tell application "Calendar" to close every window by itself, it closes. What am I missing??


tell application "Finder"

activate

open application file "Calendar.app" of folder "Applications" of folder "System" of startup disk

tell application "Calendar" to close every window

end tell


thanks


iMac Line (2012 and Later)

Posted on May 20, 2020 2:31 PM

Reply

Similar questions

1 reply

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.

close app window

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