Skip navigation.
 
mlRe: "hooking" into another app
FROM : Kyle Sluder
DATE : Mon Apr 14 23:30:41 2008

On Mon, Apr 14, 2008 at 5:12 PM, Don Arnel <<email_removed>> wrote:
>  I've only been working with a Mac running Leopard now for about 5 weeks and
> am not familiar with AppleScript or the Script Editor. I ran the Script
> Editor and dragged the iChat.app (since you said that app had lots of
> handlers) file into it, but what am I looking for? I saw no scripting
> interface. Am I doing it wrong? Is that how I was suppose to "drop it on
> Script Editor"?


Scriptable applications provide what are known as "dictionaries" of
their "terminology".  You can open an application's dictionary using
the Open Dictionary item on Script Editor's File menu.

Under the hood, AppleScript is just a human-readable representation of
Apple Events, which are the primitive IPC mechanism on Mac OS (well,
if you don't want to talk about kernel-level IPC through mach ports or
BSD-layer IPC with pipes and sockets, that is).  Apple Events are
somewhat analogous to Windows messages like WM_CLOSE, but they are a
lot more structured and versatile.

When you right-click and application's Dock icon and click Quit, for
example, the OS is actually sending that app a Quit Apple Event.  This
is just like when you quit an application from the Task Manager in
Windows (in that case, Windows posts a quit event to the app's message
queue -- actually its first top-level window -- which is usually
special-cased in the app's message pump).

But the similarities pretty much end there.  Windows also uses
messages for a lot of internal message passing.  Also, in Windows,
pretty much everything is a window, and you can iterate through all
the windows owned by any process you own (generalizing here in the
context of security descriptors).  Neither of these is the case on OS
X.  You have no access to another application's internal structures
whatsoever; you only have access to what the application grants you,
which in most cases is merely Apple Events/AppleScript.  In this
sense, Apple Events are used more like COM.

Long story short, you're going to need to seriously retrain yourself
for how OS X is architected.  It is a very different beast from
Windows.

--Kyle Sluder

Related mailsAuthorDate
ml"hooking" into another app Don Arnel Apr 14, 14:30
mlRe: "hooking" into another app Thomas Davie Apr 14, 16:00
mlRe: "hooking" into another app I. Savant Apr 14, 16:08
mlRe: "hooking" into another app I. Savant Apr 14, 16:12
mlRe: "hooking" into another app Don Arnel Apr 14, 16:26
mlRe: "hooking" into another app I. Savant Apr 14, 16:40
mlRe: "hooking" into another app Keary Suska Apr 14, 16:49
mlRe: "hooking" into another app Florian Soenens Apr 14, 16:58
mlRe: "hooking" into another app Oliver Quas Apr 14, 17:24
mlRe: "hooking" into another app Don Arnel Apr 14, 18:56
mlRe: "hooking" into another app Chilton Webb Apr 14, 19:01
mlRe: "hooking" into another app Christopher Nebel Apr 14, 19:03
mlRe: "hooking" into another app I. Savant Apr 14, 19:10
mlRe: "hooking" into another app Alastair Houghton Apr 14, 19:20
mlRe: "hooking" into another app I. Savant Apr 14, 19:42
mlRe: "hooking" into another app Scott Ribe Apr 14, 21:24
mlRe: "hooking" into another app Don Arnel Apr 14, 23:12
mlRe: "hooking" into another app Kyle Sluder Apr 14, 23:30
mlRe: "hooking" into another app Bill Cheeseman Apr 14, 23:39
mlRe: "hooking" into another app Don Arnel Apr 15, 02:12
mlRe: "hooking" into another app Matt Burnett Apr 15, 02:27
mlRe: "hooking" into another app I. Savant Apr 15, 03:35
mlRe: "hooking" into another app Matt Burnett Apr 15, 05:04
ml[Moderator] Re: "hooking" into another app Scott Anguish Apr 15, 06:57
mlRe: "hooking" into another app I. Savant Apr 15, 12:45
mlRe: "hooking" into another app Jens Alfke Apr 15, 23:37
mlRe: "hooking" into another app Don Arnel Apr 16, 00:07
mlRe: "hooking" into another app Ricky Sharp Apr 16, 00:09
mlRe: "hooking" into another app Jens Alfke Apr 16, 00:13
mlRe: "hooking" into another app Ricky Sharp Apr 16, 00:20
mlRe: "hooking" into another app Bill Cheeseman Apr 16, 01:39
mlRe: "hooking" into another app Christopher Nebel Apr 16, 02:13