File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Clipboard listener || Mouse listener|| something else?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Clipboard listener || Mouse listener|| something else??" Watch "Clipboard listener || Mouse listener|| something else??" New topic
Author

Clipboard listener || Mouse listener|| something else??

Ryan Madsen
Greenhorn

Joined: Mar 08, 2005
Posts: 8
I am trying to add some new features to a simple desktop application. However, I need some API help. Here is what I am trying to do:

When the user clicks on a text on the browser or on the word processor (either using the middle mouse button or a combination of keys and button) I would like to select that text, copy it, pass it to the program, and look up for its definition.

However, I have no idea which classes to look in the API.

For all of you out there that are really buffled by my explanations there is a program called "babylon" that does just that. It registers witht the OS and keeps monitoring the user at all times. You can check it out at: http://www.babylon.com/

BTW, I did some search in the forum found posts that are helpful but not enough to solve the problem.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24184
    
  34

Note that what you're asking about can't be done in pure Java. It could only be done in an OS-specific way using native (C/C++) code and JNI, the Java Native Interface.


[Jess in Action][AskingGoodQuestions]
Ryan Madsen
Greenhorn

Joined: Mar 08, 2005
Posts: 8
I see. Do you happen to have any ideas for some search keywords? What should I be looking for in C/C++?

edit: I will be programming for Windows 32 bit
[ October 11, 2005: Message edited by: Ryan Madsen ]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24184
    
  34

I don't, no. If you're interested in doing this on Windows, your best best is probably a Windows programmer's board.
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Ryan Madsen:
...BTW, I did some search in the forum found posts that are helpful but not enough to solve the problem.

Did you see this one?

http://www.coderanch.com/t/377833/java/java/listen-clipboard

(I think this is as close as you can get without going native.)


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Ryan Madsen
Greenhorn

Joined: Mar 08, 2005
Posts: 8
Yes, I have..It gets close but not exactly what I am looking for. Thank you anyway.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Clipboard listener || Mouse listener|| something else??