0

I want to make a small app that clicks through a bunch of installs to save me some time.

I want to simulate keyboard key presses in other programs in Windows 8. I have been using java.atw.Robot but with little success besides mouse movement and getting button clicks inside of my IDE and JPanels. I have read several similar post about this but most of them seem outdated to older versions of windows. The ones that do mention Windows 8 in their answers offer solutions that are now out of date.

How do you simulate Hardware Keyboard input using Java in Windows 8?

I have found that AWT.Robot works until I call a new Process and won't work until it is destroyed.

Unihedron
  • 10,902
  • 13
  • 62
  • 72
Endorox
  • 99
  • 9
  • What code have you been trying with Robot? Have you been using keyPress() and keyRelease()? These functions should still work in Windows 8. – Andy Guibert Jul 22 '15 at 22:20
  • Yes I have been. They work in the IDE but not outside of it. As an example (CRL + P) will bring up the IDEs print but (CRTL + ALT + DEL) doesn't do anything. – Endorox Jul 22 '15 at 23:38
  • For secure reasons windows doesn't allow simulating the CTRL+ALT+DEL signal (see here http://stackoverflow.com/questions/19782781/java-awt-robot-ctrlaltdel-does-not-bring-up-desired-screen). If CTRL+P is working for you, I think you've answered your original question, right? – Andy Guibert Jul 23 '15 at 13:45
  • Not really since the point of the app is not to control my IDE. I want to click through another program as a scenario test but Windows is blocking it. So once I change the forground window using JNA the awt.robot just stops working. – Endorox Jul 23 '15 at 14:00

0 Answers0