• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Get property values of a UI element in an Cross-possess manner without Accessibility APIs ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get property values of a UI element in an Cross-possess manner without Accessibility APIs ?


  • Subject: Re: Get property values of a UI element in an Cross-possess manner without Accessibility APIs ?
  • From: Kyle Sluder <email@hidden>
  • Date: Wed, 21 Dec 2011 23:03:16 -0800

On Dec 19, 2011, at 9:10 PM, 王珺翔 <email@hidden> wrote:

> I have a cocoa application running and there is a NSButton on it. From
> another process, I can get properties like "position", "title" via Mac
> Accessibility. However, other properties like "button style", "font" cannot
> be retrieved in that way. So, Is there any cocoa functions or  MacOS APIs
> that can retrieve properties of a UI element, in an cross-process way ?

If I'm correct in assuming you want to ask about the button style and font of individual controls in another app, rather than (say) asking Interface Builder what font and button style have been assigned to an object on a canvas, then no, there is no way to do this because as far as the system is concerned these are nonsensical questions to ask.

An app's windows are a black box as far as the system is concerned—the app draws whatever content it wants into the window's backing store, and receives mouse and keyboard events in the window. The concept of views exists entirely within the Cocoa framework. Things like "button style" and "font" only make sense when configuring NSViews, and Cocoa takes care of dispatching mouse and keyboard events to the appropriate NSResponder.

Because these are visual APIs rather than semantic information, they are not exposed via the accessibility API. So there is no way to accomplish what you're after.

--Kyle Sluder_______________________________________________

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

References: 
 >Get property values of a UI element in an Cross-possess manner without Accessibility APIs ? (From: 王珺翔 <email@hidden>)

  • Prev by Date: Re: Account validation in CocoaTouch for the purchased app
  • Next by Date: Re: NSString looses Umlaute
  • Previous by thread: Get property values of a UI element in an Cross-possess manner without Accessibility APIs ?
  • Next by thread: iOS generate key event
  • Index(es):
    • Date
    • Thread