Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kidfromkrypton

macrumors newbie
Original poster
Dec 7, 2019
1
0
Hi I'm new. Ok, here is my objective:

I want my mac to check everyday for apps that have no windows open (apps that I have closed but have not quit) and quit them.

This is what I know so far:

I can write an AppleScript for an app to quit.
Then set an event on my Calendar for every day.
Then using Automator, I can click "Calendar Alarm > Utilities > Run AppleScript"
Then every day, Automator will quit that app.

I just want to know if someone could help me with an AppleScript that will quit ONLY apps that have no windows open. In other words, I want the AppleScript to check if an app has no running windows, then quit it if it does not.

I do NOT want it to quit any app that has windows open.

I know next to nothing about this stuff, so hopefully I am using correct terms. Thanks for any help!
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.