How would I go about writing a #macOS automation that quits a certain app (in this case, @royalapps #RoyalTSX) if 1) it has no unsaved changes and 2) it has been in the background for 30 minutes?
(Why? Because I may absentmindedly leave connections running, and RoyalTSX even re-connects, which is usually what I want — but not if I'm not even in the office any more…)