Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Problem: Programs like Things and Together do not like to be open in two locations so while Dropbox is great for some things it is less than ideal for these. Data loss could occur. So using those on desktop/laptop is an issue and remembering to quit them has proved to not work consistently.

Desired solution: A paid app (one must exist surely? There has to be more than me that wants this) that to which I can add specific programs and which auto-quits them after x minutes of system - not that program - inactivity. or An applescript solution with some explanation on use. I am at a loss with applescript and automator. I tried to find some way to tie this to the screensaver starting but nothing I tried worked.

Super bonus points: For the app to quit those selected programs on Sleep.

I know I can access the desktop from the laptop on but I'd prefer a more automated solution if it exists. I have looked but if it's out there I cannot find it.

Any ideas would be very welcome. Thanks!

share|improve this question

1 Answer 1

I once used a script to handle this:

Applescript Application to Auto Quit Things after certain period of system idle
To make this runable, save as application.
To not show in Dock, set LSBackgroundOnly in Info.plist of created app bundle, or other ways in http://groups.google.com/group/macenterprise/browse_thread/thread/be7db35451e1dc70

global quit_after, check_every

set quit_after to 900
set check_every to 100

display dialog "Check is performed every " & check_every & " seconds. Things will be quit after " & quit_after & " seconds of system inactivity."

on reopen
    display dialog "Check is performed every " & check_every & " seconds. Things will be quit after " & quit_after & " seconds of system inactivity."
end reopen

on idle
    set idletime to do shell script "echo $((`ioreg -c IOHIDSystem | sed -e '/HIDIdleTime/ !{ d' -e 't' -e '}' -e 's/.* = //g' -e 'q'` / 1000000000))"
    if (idletime as integer) > quit_after then
        tell application "System Events"
            if ((name of processes) contains "Things") then
                tell application "Things" to quit
            end if
        end tell
    end if
    return check_every
end idle

You can run it with AppleScript Editor to make an Application, then auto run it by set Login Items in Account system preference. Please follow the web links in codes for more details.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.