Re: menu item status
Re: menu item status
- Subject: Re: menu item status
- From: Tim Schröder <email@hidden>
- Date: Wed, 07 Sep 2011 08:29:10 +0200
One way which should work would be to use the Accessibility Framework (NSAccessibility Protocol, Carbon Accessibility Reference and AXUIElement.h), but you would have to make your application a trusted app or ask the user to enable accessibility access. There is a AXMenuItemMarkChar type in the Carbon reference containing information on whether a specific menu item is checked or not.
Tim
Am 07.09.2011 um 01:44 schrieb Rainer Standke:
> Hello,
>
> I am trying to determine the state of a menu item in another application. I have tried via AppleScript UI scripting, and via AppleScript Studio's state of menu item. I am coming up empty. I can get to the menu and select the item fine - but I can't get the status. I am interested whether or not the menu item has a check mark next to it.
>
> I know this can be done programmatically, because QuicKeys knows about the status.
>
> I'd be grateful for any hints as to how to solve this problem.
>
> Thanks,
>
> Rainer_______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden