Minimize Mail window Applescript

I want to open Mail and minimize it after opening. I got the opening Mail part but can't get the minimize part.


Running Catalina 10.15.3

Thanks

iMac Line (2012 and Later)

Posted on Jan 29, 2020 6:17 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 29, 2020 7:22 PM

It may be your problem is there's an inconsistent (and changing) term used to minimize the window - it even varies by app in some cases - but try this:


tell application "Mail"

launch -- launch opens the app in the background, rather than 'activate' which brings it frontmost

set miniaturized of every window to true

end tell

2 replies
Question marked as Top-ranking reply

Jan 29, 2020 7:22 PM in response to mrokloricred37

It may be your problem is there's an inconsistent (and changing) term used to minimize the window - it even varies by app in some cases - but try this:


tell application "Mail"

launch -- launch opens the app in the background, rather than 'activate' which brings it frontmost

set miniaturized of every window to true

end tell

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.

Minimize Mail window Applescript

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