sergey-sc / run_minimized

AppleScript to Launch Mail and Calendar Apps Minimized on macOS Startup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AppleScript to Launch Mail and Calendar Apps Minimized on macOS Startup

This AppleScript is designed to run during macOS startup to automatically open and minimize both the Mail and Calendar applications. The purpose is to ensure that essential messages or events are not missed after system reboot or startup.

  1. Mail.app Launching:

    • The script initiates the Mail application using tell application "Mail" to launch.
    • It introduces a brief delay using delay 1 to ensure the application is fully opened.
    • Utilizes the Finder application to hide the Mail window by setting its visibility to false.
  2. Calendar.app Launching:

    • The script then launches the Calendar application via tell application "Calendar" to launch.
    • Similar to the Mail application, it introduces a delay for proper launch.
    • Uses the Finder application to hide the Calendar window by setting its visibility to false.

Instructions for Use:

  1. Opening AppleScript Editor: Copy the script into AppleScript Editor (found in Applications > Utilities) and save it.

  2. Setting Script to Run at Startup:

    • Open "System Preferences" > "Users & Groups" > "Login Items" or "System Preferences" > "General" > "Login Items"
    • Click the "+" button and add the saved script to the list. Ensure it's checked for execution on login.
  3. Launching Applications Minimized:

    • Upon login or system startup, the script will automatically launch Mail and Calendar apps in minimized mode, ensuring their windows are hidden.

Note:

  • Adjust the delay timings (delay 1) as needed to suit the performance of your system or the time it takes for applications to launch properly.

Feel free to modify or enhance the script according to your preferences or additional applicationa or functionalities required. You can use it not only for Mail or Calendar

About

AppleScript to Launch Mail and Calendar Apps Minimized on macOS Startup

License:MIT License