Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Automatic Keystrokes

 
Jason Chester
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all, I'm working on a web page using Java with a control on the page. I'm trying to get rid of the stupid "press spacebar to activate this control" message and decided to run a method which would automatically have the program press spacebar or enter. However, I'm having a hard time figuring out how to get it to work. I'm approaching it with

keybd_event(VK_ENTER) or
keyPress(KeyEvent.VK_ENTER);

but can't seem to get it to work. Let me know if you have any help...
Jason
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.awt.Robot
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic