Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes General Computing and the fly likes captured text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "captured text" Watch "captured text" New topic
Author

captured text

Saras Thangaraju
Greenhorn

Joined: Jan 30, 2004
Posts: 6
hi everyone....i am not too sure about this but i need to get some infor so i could work on it...any help would be gret
currently i have worked on to capture highlighted text from any desktop application using short-cuts keys on keybrd and translating the highlighted text to open another appliction....
i need to do this on the mouse cursor...how do i capture the word that i have highlighted, so that its displayed on my application when i open it using right click...so i have to know the co-ordinates of the highlighted rectangle?
help
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4340
    
    2

windows has that functionality built-in. ctrl c is copy ctrl v is paste


SCJP
Visit my download page
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4340
    
    2

i found an example in my textbook that should help.
private JTextArea display = new JTextArea;
private String scratchpad = "";
// if whatever
scratchpad = display.getSelectedText();
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: captured text
 
Similar Threads
Want to obtain the url being displayed in the currently active browser window
Opening a File with the appropriate program with highlighted text
Drag text field on label and set label's text in textfield
Opening a File with the appropriate program with highlighted text
Cursor positioning