• 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: What is "system events" ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is "system events" ?


  • Subject: Re: What is "system events" ?
  • From: Jean-Christophe Helary <email@hidden>
  • Date: Sat, 21 Oct 2017 01:10:27 +0900

Thank you Phil.

> On Oct 21, 2017, at 0:50, 2551phil <email@hidden> wrote:
>
> As to the question, System Events is an app, like any other app (sort of). It
> lives here:
>
> /System/Library/CoreServices/System Events.app
>
> The thing that makes it different is that it doesn’t have a GUI, and it’s
> whole purpose is to be accessed through Applescript for scripting (as it’s
> name implies) system functions such as inspecting running processes,
> sleeping, restarting and shutting down the computer. It can do quite a few
> other things, too, which you can explore through its Dictionary.

In one of the references that Bill mentioned (Matt Neuburg's TidBits article),
there is a very enlightening explanation:

http://tidbits.com/static/html/TidBITS-670.html#lnk3

> Blessed (System) Events -- At some point, someone at Apple put two and two
> together, as follows. "On the one hand, we've got the Accessibility API,
> which lets any program access the interface elements of any other program. On
> the other hand, we've got AppleScript, which lets any user write a script to
> give commands to any scriptable program. So what would happen if we put them
> together? Any user would be able to write a script to give commands to a
> scriptable program which would use the Accessibility API to access the
> interface elements of any program." To see the significance of this, just
> take out the middle terms, and what have you got? Any user can write a script
> that can access the interface elements of any program. Any user can script an
> unscriptable program, using AppleScript! You wouldn't need any special macro
> program, because AppleScript itself, which is already on your computer, would
> become a macro language.
>
> Of course, for this to work, there has to be that "middle term" - the
> go-between, the application that receives AppleScript commands and talks to
> the Accessibility API. That application is called System Events. It's on your
> computer right now, in /System/Library/Core Services.
>

But here, he mentions only the accessibility API, which gives "GUI scripting",
right?

What other practical use cases are there for System Events scripting? Would you
have a simple example?

And thank you for the book reference. I'll be putting it either on my BD list
or on my Xmas list :)

Jean-Christophe 
 _______________________________________________
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

  • Follow-Ups:
    • Re: What is "system events" ?
      • From: Shane Stanley <email@hidden>
References: 
 >What is "system events" ? (From: Jean-Christophe Helary <email@hidden>)
 >Re: What is "system events" ? (From: 2551phil <email@hidden>)

  • Prev by Date: Re: [applescript] What is "system events" ?
  • Next by Date: Re: [applescript] What is "system events" ?
  • Previous by thread: Re: What is "system events" ?
  • Next by thread: Re: What is "system events" ?
  • Index(es):
    • Date
    • Thread