Re: Apple Events vs. AppleScript
Re: Apple Events vs. AppleScript
- Subject: Re: Apple Events vs. AppleScript
- From: Doug McNutt <email@hidden>
- Date: Fri, 18 May 2001 19:19:48 -0600
>
Can anyone explain the difference between an Apple Event and an AppleScript?
I'll try:
An Event in the MacOS is something a user does, mouse down, key pressed, menu selected, and the like. Applications get themselves started and do a system call GetNextEvent(). When an event occurs they act on it. Until an event occurs they just wait, usually giving other applications a chance to run.
System 7 introduced another kind of event not generated by a user but by another running application. They are called High Level Events or AppleEvents. Applications can choose to accept or ignore them. Most now accept them. The finder uses high level events, for instance, to ask an application to open a document which was dropped on its icon.
AppleScript can be perceived as an application which prepares and sends AppleEvents to other applications. AppleEvents are the method by which AppleScript operates. Other applications can also generate AppleEvents. That's what happens when you double click a URL in Eudora. An AppleEvent is sent to your browser of choice which causes it to open the URL.
In other systems the common name for this is Inter Process Communication or IPC. The powers that be at Apple would never use such a common name. It's a bit like having folders instead of directories. MacOS neXt is changing all that.
--
-> From the U S of A, the only socialist country that refuses to admit it. <-