• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trigger mouse click at current mouse location.

 
Tobe Stephens
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I want to be able to hit a key ( let's say the space bar ) and have it duplicate the mouse click action. Don't ask why
Basically, I want to move the mouse around the applet and when I press the space bar, trigger a mouse click as if I'd hit the mouse button.
Any ideas how I'd bring this crazy notion into fruition ?
Tobe
 
Amit Agarwal
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tobe,
use the Robot class for generating the mouse click from your program.
Regards,
Amit
 
Tobe Stephens
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks man.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic