In my app I want to check if windows from others apps are resizable.
I´m using the accessibility API to test if the window has the kAXGrowAreaAttribute attribute (if NULL is not resizable) as Peter Hosey answered in this question.
The problem is that the kAXGrowAreaAttribute returned value is always NULL it doesn´t matter if the window is resizable or not. Note: to retrieve the value I´m using the UIElementUtilities class from the Apple UIElementInspector example (I also have tried using AXUIElementCopyAttributeValue directly with the same result).
Any idea? I´m working in Lion, could be this the problem? Thanks in advance.
EDITED:
Playing around with the UIElementUtilities class methods I found a solution.
Just use the method
+ (BOOL)canSetAttribute:(NSString *)attributeName ofUIElement:(AXUIElementRef)element
with the kAXSizeAttribute and the focused window. It returns YES or NO depending if the window is sizable or not...