title: NSStatusItem (cocoa) location on screen
body: <p>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.</p>
  
  <pre><code>event = CGEventCreateMouseEvent(NULL, kCGEventLeftMouseDown, newLocation, kCGMouseButtonLeft);
  CGEventPost(kCGHIDEventTap, event);
  CFRelease(event);
  </code></pre>
  
  <p>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</p>
  
  <p>The NSStatusItem is using an NSMenu not a custom view.</p>