Is there a method in objective-c or swift to select menu items by name and application identifier if the application is running? I see this functionality is available to the operating system under system preferences > keyboard > shortcuts, but was wondering if there was a developer facing API that would allow the same thing. The menu item should be executed without any visual queues to the user, if possible.
Asked
Active
Viewed 294 times
0
-
Do you want to pop the menu open as well - or is it sufficient for the menu item to be executed? i.e. does it have to be seen to be done as well as done? – headbanger Dec 09 '16 at 19:41
-
It is fine if the menu item is executed without any visual aid from the menu. I have edited the question to reflect this. – sakurashinken Dec 09 '16 at 20:53
-
Similar questions: [Programmatically open Mac Help menu](http://stackoverflow.com/q/4200925/4244136) and [Alternatives for CGEventPostToPSN() for activating an other app's menu item in a sandboxed environment?](http://stackoverflow.com/q/7993062/4244136) – Willeke Dec 10 '16 at 16:33