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.

Frankly, I don't think there *is* a reliable way to solve this problem 
regardless of the luck QuickKeys might exhibit. Why? Because I can't see any 
reason to assume the checked/unchecked state of a given menu item will be valid 
while the menu containing it is not displayed.

Without knowing the details of what program you're trying to interact with any 
why, my first inclination would be too look not for a way to tell if the menu 
item is checked but to query the state of the underlying setting or object that 
menu item represents.

Greg

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to