I need to add a context sensitive menu to file icons in a search device. Thus, basically, if I right-click on, say, the icon “filename.txt”, the submenu should appear “Open”, “Get information”, etc., but an additional element should be added that says, for example , "My program." And if the user selects the menu item "My program", the system will execute: "my_program.rb filename.txt".
I have Mac OS 10.6 32-bit.
I checked the stack overflow and I posted the solutions there, but I'm a bit confused by them. First, according to this article , you need to “add a service that allows you to use the sharing tool,” but that scares me. What is a “service”? Is it a program with special hooks for the OS or something like that?
There is also an article for Apple to provide the service , but again, I'm a little confused by it. Can ruby script be considered a "service"? Or do I need to do some weird Cocoa thing in a C object to access the submenu and then access the script there?
Is there an easier way to do this? Maybe an open source program that I have not yet encountered?
source share