Re: AXUIElementCopyAttributeValue
Re: AXUIElementCopyAttributeValue
- Subject: Re: AXUIElementCopyAttributeValue
- From: Modesitt Software <email@hidden>
- Date: Thu, 25 Mar 2004 15:46:27 -0800
I know about the bug, but this is in Panther, but maybe it's related
because of the colon in the window title? In this example I can't use
kAXDocumentAttribute because kAXDocumentAttribute requires the document
to have a proxy icon associated with the file, and iMovie does not use
proxy icons.
Thanks,
Bill
On Mar 25, 2004, at 3:05 PM, Mike Engber wrote:
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.