I'm using more and more Applescripts for home automation that rely on System Events being active. The problem is that System Events shuts down if it hasn't been used for a while. I'm not sure how long the time is though. 15 min? 5 min? Regardless… if System Events isn't active, there's either a pause or an error while it launches, meanwhile I wonder what happened. I don't want to build delays into the Applescripts because many of them are for remote control type actions (imagine if your TV required a 10 second delay every time you tried to use your remote. That'd be annoying).
Is there a way to keep System Events active? Is there a reason to NOT keep System Events active?
I'm on Mavericks, if that matters.
Best Answer
Save this plist as
~/Library/LaunchAgents/systemevents.plist
:Then run
launchctl load ~/Library/LaunchAgents/systemevents.plist
.It doesn't fix the glitches in the QuickHue script though. I was probably wrong when I said that the error was caused by System Events not being open.