Getting the position of my application's dock icon using Cocoa's Accessibility API
How can I get the position of my application's dock icon using the Accessibility API? Found it! Using this forum post as reference, I was able to shape the given sample code to what I needed: - (NSArray *)subelementsFromElement:(AXUIElementRef)element forAttribute:(NSString *)attribute { NSArray *subElements = nil; CFIndex count = 0; AXError result; result = AXUIElementGetAttributeValueCount(element, (CFStringRef)attribute, &count); if (result != kAXErrorSuccess) return nil; result = AXUIElementCopyAttributeValues(element, (CFStringRef)attribute, 0, count, (CFArrayRef *)&subElements); if