Re: NSStatusItem doesn't send kAXMenuOpenedNotification when it pops up menu?
Re: NSStatusItem doesn't send kAXMenuOpenedNotification when it pops up menu?
- Subject: Re: NSStatusItem doesn't send kAXMenuOpenedNotification when it pops up menu?
- From: Tom Bunch <email@hidden>
- Date: Tue, 6 Jun 2006 15:42:04 -0700
Hi Bill,
I'll go into a little more detail about why my current solution
doesn't work:
I'm installing a carbon application event handler watching for
EventTypeSpec eventTypeSpec = (EventTypeSpec) {
kEventClassApplication,
kEventAppFrontSwitched,
};
When I receive one, I can pull out the PID of the now active
application and AXObserverCreate and AXUIElementCreateApplication for
it. I can then get its kAXFocusedUIElementAttribute (or related
fallbacks). This works great for most traditional apps because they
actually become active - it's impossible to browse the menu bar for a
non-active application, of course.
It _is_ possible to browse the Dock menus and status menus for non-
active applications. In fact, I'm not certain what application is
putting up the following NSStatusItems: Display Mode, Volume Control,
Input Menu, Date & Time, Bluetooth. I would expect System
Preferences, but if that were so I should be receiving
kAXMenuOpenedNotification when observing the system preferences app
for it. I'm not. If I use OmniDazzle to observe itself, I _do_ get
the notification for the status menu and dock menu.
My current plan is to try another event handler watching for
kEventClassApplication / kEventAppGetDockTileMenu. I'm expecting
that will cover the Dock menus but I'll still be out of luck for the
status menus.
-Tom
On Jun 6, 2006, at 2:58 PM, Bill Cheeseman wrote:
on 2006-06-06 5:46 PM, Tom Bunch at email@hidden wrote:
In OmniDazzle, I need to get kAXMenuOpenedNotification so that I can
highlight that the menu has focus. This works great for app menus
and NSPopupButtons, but not for NSStatusItem menus. Anyone know of a
workaround?
Give me a list of common applications that have one, and I'll see
what I can
find out.
--
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.
Accessibility-dev mailing list (Accessibility-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40omnigroup.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden