Is it possible to add an item to the right-click context menu of a Mac OS programmatically?

十年热恋 提交于 2019-12-05 18:02:03

问题


I have a program that works with a variety of files on both the Windows and Mac OS.

I would like to give the user the option of adding a new option to their right click/control click context menu to the effect of "Compress with [Name of App]".

I know this is quite possible in Windows with modifications to the registry, but is there a way to achieve this for the Mac? Perhaps using C++ or objective C?


回答1:


Yes, you can. You need to make a contextual menu plugin. Apple has contextual menu plugin sample code on its developer site.




回答2:


Here's a guide: Writing Contextual Menu Plugins for OS X, part 1



来源:https://stackoverflow.com/questions/894723/is-it-possible-to-add-an-item-to-the-right-click-context-menu-of-a-mac-os-progra

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!