views:

87

answers:

1

Hi,

I'm interested in writing a plugin for OS X to support multiple operations on highlighted text in the right click context menu. The operations are simple enough that I could write them by myself. I've looked at automator's "Copy to Clipboard" action, but it requires some text input first. The "Get contents of Clipboard" action will make my operations require the highlighted text to first be copied to the clipboard.

So the question is simple: how do I access the system wide highlighted text buffer? Or is this strictly off limits?

Thanks!

A: 

There's no such thing as "the system wide highlighted text buffer"; just selecting text doesn't move it to a central location like the clipboard. And since you can have text selected in multiple windows at once, it's not really clear what that would even do.

Have you considered using the services menu? It's specifically designed to allow third party apps to provide operations for users to perform on selected text.

smorgan
I've taken a look at the services menu; seems easy enough- I think that's what I'll end up doing for now. Hopefully September brings a few pleasant surprises!
bhargav