NSStatusItem (cocoa) location on screen
- by Craig
I am trying to get the on screen location of an NSStatusItem so that I can perform a click on that area via code like below. I am doing this so that my users can press a hotkey to see the menu.
event = CGEventCreateMouseEvent(NULL, kCGEventLeftMouseDown, newLocation, kCGMouseButtonLeft);
CGEventPost(kCGHIDEventTap, event);
CFRelease(event);
Does anyone know of a way to get the location?, I have been trying ideas and searching for days and have found several ideas but none of them seem to work in leopard/snow leopard
The NSStatusItem is using an NSMenu not a custom view.