Sign in to follow this  

[java] Getting Mouse Position In Java

This topic is 3313 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Let me preface this by saying that MouseEvent and MouseListener work for the mouse position, but if you Alt-Tab they no longer work. Is it possible to send the mouse's position to your program while another program is maximized? I'm trying to receive mouse coordinates while playing Madden 2008 and then send them to my program (which will then enact various effectors with those details).

Share this post


Link to post
Share on other sites
This problem is too similar to warrant it's own topic.

Is it possible to catch a keystroke and initiate an action while you are running another program? I guess it would be quite similar to a macro.

Share this post


Link to post
Share on other sites
I do not know a direct Java Class that would give you access to the system interrupt of a key. You would have to do this yourself. As I do not do such things very often I would recommend to have a look at the systems libraries and if there is something useful use it with JNA https://jna.dev.java.net/. It is a little bit easier as to write your own JNI first.

[Edited by - INsanityDesign on November 17, 2008 4:20:01 AM]

Share this post


Link to post
Share on other sites

This topic is 3313 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this