on 2006-05-07 10:47 AM, Scott Thompson at email@hidden wrote:
> On May 7, 2006, at 4:41 AM, Erik Schmidt wrote:
>
>> I have two questions.
>>
>> one: is it possible to monitor th eevents being sent to other
>> applications?
>
> ... In contrast to Windows where it is possible to monitor windows
> messages in other applications, on the Mac you are only allowed to do
> as much as the application in question will let you.
To expand on this a little, the accessibility API allows an assistive
application to "register" to observe accessibility notifications from other
applications. All standard Carbon and Cocoa UI elements automatically post
such notifications when a user interacts with the target application by
clicking buttons, choosing menu items, filling in text fields, and generally
using any UI elements within the target application's windows and menus.
You either have to instruct your users to turn on the "Enable access for
assistive devices" setting in the Universal Access pane of System
Preferences or, better, write a routine to allow the user to mark your
assistive application as a "trusted application" upon installation.
You can watch the notifications feature of the accessibility API in "live
action" mode by downloading the 30-day trial version of PreFab UI Browser at
www.prefab.com/uibrowser/. Select a target application, open the
Notifications drawer, register for any notifications you like, open the
notifications log window, then start playing with the target application.
The notifications it generates will scroll down the notifications log
window. (I haven't yet implemented the "trusted application" feature in UI
Browser, so don't forget to turn on "Enable access for assistive devices. UI
Browser will remind you to do this, if necessary.)
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden