How can I keep System Events from deactivating? 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.
Save this plist as ~/Library/LaunchAgents/systemevents.plist:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
  &lt;key&gt;Label&lt;/key&gt;
  &lt;string&gt;systemevents&lt;/string&gt;
  &lt;key&gt;Program&lt;/key&gt;
  &lt;string&gt;/System/Library/CoreServices/System Events.app/Contents/MacOS/System Events&lt;/string&gt;
  &lt;key&gt;RunAtLoad&lt;/key&gt;
  &lt;true/&gt;
  &lt;key&gt;KeepAlive&lt;/key&gt;
  &lt;true/&gt;
&lt;/dict&gt;
&lt;/plist&gt;


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.