Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
AXUIElementPostKeyboardEvent experience
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AXUIElementPostKeyboardEvent experience

I have AXUIElementPostKeyboardEvent working with the system-wide event. I
can successfully bring TextEdit to the front and send Command-N to it, and
TextEdit opens a new window.

But I can't get it to work with an application element for a background
application. When the same Command-N is sent to TextEdit in the background,
the "N" appears in the text window and a new window is not created.
Command-Q sent to TextEdit and a variety of other apps doesn't work, either.
The background app is obviously seeing the character, but somehow it isn't
seeing the command key. I know the command key is being sent, because I see
the function being called on that branch of my code in the debugger, and the
same code works in a parallel method using the system-wide element.

Is this a known limitation of AXUIElementPostKeyboardEvent at this time?
(I'm running Mac OS X 10.2.1 on this machine.)


Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA

The AppleScript Sourcebook -
Vermont Recipes -
Croquet Club of Vermont -
accessibility-dev mailing list | email@hidden
Do not post admin requests to the list. They will be ignored.

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.