You can do this with Services if you are willing to have it in the services 
menu of the contextual menu, the user has to enable your service by going to 
System Preferences > Keyboard > Keyboard Shortcuts, you may be able to 
AppleScript that. If you are just writing scripts for you own use that you want 
to use from the Contextual Menu, do a google search for Mac Services 
AppleScripts. I think there is at least 1 app that lets you run scripts as 
services.

Doing it in Cocoa is pretty straight forward.

On 13/07/2012, at 3:45 PM, Rakesh Singhal <rakesh.sing...@gmail.com> wrote:

> Hi Eric,
> 
> Thanks. I am trying to do it using Services but I couldn't find any sample
> code.  Can I do it in python?
> 
> Regards,
> Rakesh Singhal
> 
> On Tue, Jul 3, 2012 at 12:09 AM, Eric Schlegel <eri...@apple.com> wrote:
> 
>> 
>> On Jul 2, 2012, at 9:53 AM, Rakesh Singhal <rakesh.sing...@gmail.com>
>> wrote:
>> 
>>> There are applications (eg. dropbox) which are able to create items in
>>> finder's contextual menu, not service. There should be some way to do it.
>> 
>> There is no supported way to do this. Dropbox uses various hacks to make
>> its way into the Finder process. Frequently, the current version of Dropbox
>> is incompatible with a new release of Mac OS X and has to be disabled.
>> Don't use them as a model.
>> 
>> -eric
>> 
>> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/nathan_day%40mac.com
> 
> This email sent to nathan_...@mac.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to