Skip navigation.
 
mlRe: "hooking" into another app
FROM : Jens Alfke
DATE : Tue Apr 15 23:37:27 2008

On 14 Apr '08, at 2:39 PM, Bill Cheeseman wrote:

> However, the
> Accessibility API is also wonderfully useful for doing lots of other 
> things,
> such as hooking into a text chat window so that you can log the 
> incoming
> messages.


I'm not so enthusiastic about it … it's basically the GUI equivalent 
of Application Enhancer, or of HTML screen-scraping. Just as searching 
through the raw HTML of a website isn't a reliable way to get 
information from the server, groping through the views of another app 
isn't a reliable way to interact with it. In both cases, there's 
nothing to keep the layout of the user interface from changing in the 
future, and even minor changes that don't have a visual effect could 
break anything that's groping inside them. (For example, if the order 
of two buttons gets changed around for some reason in a nib, something 
using the accessibility API to drive those buttons is going to end up 
pressing the wrong one.)

I understand that sometimes there isn't any other way to get something 
done, but IMHO using accessibility to do such things is in the "skanky 
hack that just happens to work" category. In the case of iChat it 
would be a lot better to use its existing AppleScript support to add 
handlers for when messages are received.

—Jens

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