• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: System Events 'not running'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System Events 'not running'


  • Subject: Re: System Events 'not running'
  • From: Steve Mills <email@hidden>
  • Date: Fri, 02 Nov 2018 23:33:54 -0500

I've been seeing this with increasing regularity in the past couple months at
work, where our dev Macs are still on 10.10.5 (new machines are on the way!). I
have no idea why. Since I've been experiencing other unexplainable problems,
including a few hard disk errors that aren't fixable, I've been chalking them
all up to a decaying, decrepit Mac and OS. But seeing that others are seeing it
on newer OSes, it sure sounds like something Apple has done. But what?!

I ended up running a script via DragThing (so I can assign it a global key
equiv). I usually have to also quit the app trying to send the AppleScripts to
System Events and other apps, run the script, then try again. It might take 2
or 3 tries before it works again.

I also found that getting System Events to quit isn't all that simple when the
scripting system doesn't think it's running in the first place. Here's my
script. The beeps at the end let me know when I can launch apps and try again.
And yeah, a reboot will stave it off for a while, but it always returns.

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

set res to do shell script "ps -ax | grep 'System Events'"
set SystemEventsPID to ""

repeat with par in every paragraph of res
        if par does not contain "grep" then
                set SystemEventsPID to word 1 of par
                exit repeat
        end if
end repeat

if SystemEventsPID is not "" then
        do shell script "kill 3 " & SystemEventsPID
end if

tell application "System Events"
        run
end tell

beep 2

--
Steve Mills
Drummer, Mac geek

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >System Events 'not running' (From: "Jacopille, David" <email@hidden>)
 >Re: System Events 'not running' (From: Stephen Cronin <email@hidden>)
 >RE: System Events 'not running' (From: "Jacopille, David" <email@hidden>)

  • Prev by Date: Re: System Events 'not running'
  • Next by Date: Re: System Events 'not running'
  • Previous by thread: RE: System Events 'not running'
  • Next by thread: Re: System Events 'not running'
  • Index(es):
    • Date
    • Thread