• 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: AXUIElementCopyAttributeValue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AXUIElementCopyAttributeValue


  • Subject: Re: AXUIElementCopyAttributeValue
  • From: Mike Engber <email@hidden>
  • Date: Thu, 25 Mar 2004 15:05:53 -0800

I believe you're running into a bug (only affecting Cocoa apps) that was fixed in Panther.

In Jaguar, the title attribute used the NSWindow's title method which included (sometimes) the file's path concatenated on at the end.

In Panther, it returns just the title. If you want the file, then use the kAXDocumentAttribute.

-ME

On Mar 25, 2004, at 2:37 PM, Modesitt Software wrote:

My code obtains the frontmost window title of the frontmost application using AXUIElementCopyAttributeValue with the attribute kAXTitleAttribute:
CFTypeRef cfRef;
axErr = ::AXUIElementCopyAttributeValue( theElementRef, kAXTitleAttribute, &cfRef );
which works in most cases. However, on some windows, such as iMovie windows, only part of the window title is returned.
For example, if my iMovie file is called MyBigMovie, the window title is
iMovie: MyBigMovie 57:42 (NTSC)
however, AXUIElementCopyAttributeValue only returns "iMovie" as the window title. I did notice that as iMovie is starting, the window title starts as iMovie, then later the file name is appended. Could that be why AXUIElementCopyAttributeValue only returns iMovie as the window title? Or is there something else I need to do, or is that how the accessibility APIs work?

Thank you,
Bill Modesitt
_______________________________________________
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.
_______________________________________________
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.


  • Follow-Ups:
    • Re: AXUIElementCopyAttributeValue
      • From: Modesitt Software <email@hidden>
References: 
 >AXUIElementCopyAttributeValue (From: Modesitt Software <email@hidden>)

  • Prev by Date: AXUIElementCopyAttributeValue
  • Next by Date: Re: AXUIElementCopyAttributeValue
  • Previous by thread: AXUIElementCopyAttributeValue
  • Next by thread: Re: AXUIElementCopyAttributeValue
  • Index(es):
    • Date
    • Thread