是否可以通过编程将项目添加到Mac OS的右键单击上下文菜单中? [英] Is it possible to add an item to the right-click context menu of a Mac OS programmatically?
问题描述
我有一个可以在Windows和Mac OS上处理各种文件的程序.
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]".
我知道在Windows中通过修改注册表可以实现这一点,但是有没有一种方法可以在Mac上实现呢?也许使用C ++或目标C?
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?
推荐答案
是的,可以.您需要制作一个上下文菜单插件.苹果在其开发人员站点上具有上下文菜单插件示例代码.
Yes, you can. You need to make a contextual menu plugin. Apple has contextual menu plugin sample code on its developer site.
这篇关于是否可以通过编程将项目添加到Mac OS的右键单击上下文菜单中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!