Results 1 to 7 of 7
- 07-16-2011, 12:04 AM #1
Get A Click From Anywhere On The Screen
Hello, I am having a bit of a problem I wanted to make an auto clicker program for games and what not, but I can't figure out how to get a click from anywhere on the screen. I have seen ways to do it if you click the application, but I don't want that. If you could help me I would really appreciate it. Just so I don't get a "google is your friend" comment I have been researching it and can't figure out how to do it.
If you are interested in having your program control the mouse and click anywhere, then you will want to check out the Robot class. The API for this class will tell you the methods that it has available. But having said that, I will also say that for me Java isn't the best programming language to use for driving other applications, mainly because Java distances itself from the operating system, and most driver apps will need to get close to the OS especially if they need to sense the response from the driven program. For Windows I've used AutoIt with some success.
- 07-16-2011, 12:14 AM #3
- 07-16-2011, 02:21 AM #5
I will try and figure it out but I have no idea what jni or jna is
- 07-16-2011, 04:41 AM #7Senior Member
- Join Date
- Jul 2009
but how would I go about getting it to tell if someone pressed the mouse.
- Rep Power
However, since you want to listen to all mouse events, you can check out: Global Event Listeners « Java Tips Weblog
- By Norm in forum Forum LobbyReplies: 2Last Post: 06-22-2011, 01:19 PM
- By GlWy in forum AWT / SwingReplies: 0Last Post: 05-04-2011, 09:35 PM
- By Broodjie in forum Advanced JavaReplies: 1Last Post: 03-21-2011, 11:17 PM
- By jprgmr75 in forum CLDC and MIDPReplies: 0Last Post: 01-02-2011, 07:32 PM
- By mohana.krishna in forum Java ServletReplies: 0Last Post: 03-03-2009, 06:03 PM