Re: AXUIElementPostKeyboardEvent experience
Re: AXUIElementPostKeyboardEvent experience
- Subject: Re: AXUIElementPostKeyboardEvent experience
- From: "John O. Louch" <email@hidden>
- Date: Mon, 16 Dec 2002 15:27:32 -0800
Almost certainly AXUIElementPostKeyboardEvent post keyboard event is
sending the character to the app. I don't know for sure, but I bet apps in
the background do not respond to command-keys (which would make sense).
It sounds like you are using the wrong api in any case. If you want an app
to quit, then send it a quit appleevent. If you want to do a menu command
when the app is in the background then find the menu item with the
Accessibility api and post the AXPressAction.
Hope this helps,
jl
>
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
>
http://www.quecheesoftware.com
>
>
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
>
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
>
Croquet Club of Vermont - http://members.valley.net/croquetvermont
>
_______________________________________________
>
accessibility-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/accessibility-dev
>
Do not post admin requests to the list. They will be ignored.
---------------------------------------------
John Louch Internet #: email@hidden
(805) 546 0216
_______________________________________________
accessibility-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/accessibility-dev
Do not post admin requests to the list. They will be ignored.