1

Is there some class in java with a method that can retrieve the text that we select with the text cursor on any Microsoft Windows program or document ?

The reason why I want this feature is to make a program that can take this selected text as a input for a dictionary server return the meaning of the word.

Pseudocode for ilustration:

        MyProgram{            
        word=getSelectedWord()             //Get the text highlighted from MS system.
        meaningOfWord=getMeaning(word)    // Meaning of the word                                                                                                                                  }                                            //from a web dictinary 

Thank you and sorry for the bad english.

web.learner
  • 101
  • 2
  • 8
  • If you have copied something, then [Clipboard](http://docs.oracle.com/javase/7/docs/api/java/awt/datatransfer/Clipboard.html) can help. [Here](http://www.javapractices.com/topic/TopicAction.do?Id=82) is an example. Otherwise wouldn't it be creepy to access content from other application. – ares Jun 06 '15 at 17:08

0 Answers0