I frequently leave several apps open on my MacBook. I am trying to create a macro to help me quit the idle apps after 30 minutes of inactivity in the particular app.
How do I go about it?
I used to use this setup to quit apps:
Quit Triggers
Quit Paperless
Triggered by any of the following:
Application āPaperlessā deactivates
Will execute the following actions:
Pause for 300 Seconds
Notify on failure.
If All Conditions Met
Application āPaperless.appā is not at the front
Execute the Following Actions:
Quit Paperless
Otherwise, Execute the Following Actions:
Cancel This Macro
But now I use SuperTab, which is easier to configure hiding and quitting applications in the background. Thereās probably an AppleScript script that you could also use.
Its tricky (and probably a bad idea) to do it for all applications, but if there are specific applications, then you can do something like this:
Macro: Quit MyApp
Trigger: MyApp Deactivates
Actions:
Set variable "My App Deactivates Time" to calculation NOW()
Pause 30 Minutes
if application MyApp is not at front and calculation NOW()-My App Deactivates Time > 29*60 then
Quit MyApp
I follow everything you've done here, and when I click on the cogs and select "Try" the actions are working -- but my macro isn't executing. Have I done something wrong?
(NB in this image "5 seconds" is just for testing: I'll change it later to 300.)
That ātryā button is a little confusing. You have to actually select something for it to do anything (unless Iām mistaken). So either you can select all the actions and click try, or better yet, assign a hot key trigger.
But you should be aware that your macro will actually be running, if PowerPoint is running, even if youāre editing the macro. Thatās the danger of timers.
Itās much safer, when testing, to turn off the timer and rely on a hot key. Thatās what I think, anyway, for what itās worth!