Hi,
I am able to simulate mouse click event using the following code-snippet.
CGEventSourceRef source = CGEventSourceCreate(kCGEventSourceStateCombinedSessionState);
CGEventRef theEvent = CGEventCreateMouseEvent(source, type, point, button);
CGEventSetType(theEvent, type);
CGEventPost(kCGHIDEventTap, theEvent);
CFRelease(theEvent);
But I want to know how to click sub-menu item. Say for example if i send x,y position as to click finder menu item it opens up. If I send the next x,y position to click " About Finder" it triggers the click event under the menu item..