• Post Reply Bookmark Topic Watch Topic
  • New Topic

Mouse Location  RSS feed

 
Rick Gentry
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm playing around with java.awt.Robot and I've run into a brick wall. Robot let's you move the mouse, but it won't tell you where it is. I need to find a place relative to where the mouse already is, but how do you do that without already knowing the location of the mouse?

I glanced through the source code for Robot. robot.mouseMove(int x, int y) just does robotPeer.mouseMove(int x, int y), and RobotPeer is an interface. I don't know a thing about interfaces so that's yet another .

I'm trying to manipulate another application, so any button clicking or motion wouldn't be picked up as an event.
 
Eric Snell
Greenhorn
Posts: 28
Java Mac MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about java.awt.MouseInfo.getPointerInfo() ?
 
Rick Gentry
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have that. What version of java are you running? 1.5 maybe?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!