views:

17

answers:

2

Novice programmer asking first question on stack-overflow. I am writing an app for mac osx that monitors for text selection ie when a user does a double click on some text. The text can come from a browser or text editor, etc. The goal is to capture the text and do some processing on the text.

I been reading about the mouse and cursor events in mac library but doesn't seem to answer my questions and googling around leaving me bit lost. http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/EventOverview/MouseTrackingEvents/MouseTrackingEvents.html

Anyone guru want to share where I can find the answer? Any guidance will be appreciated! :)

Thank you!

+1  A: 

You can't monitor from an app what the user is doing with some other app. If you want to provide something which manipulates selected texts in other apps, use System Services. All you have to do is to provide the function which consumes the selected texts; OS X automatically does all the monitoring, passing of the selected text to your app etc.

Starting with 10.6, system services also appear in the context menu.

Yuji
A: 

Thank you, Yuji! I will reference it.

Unikorn