0

can java even do this? i know it is suppose to be "sandboxed" but what i'm looking to do is this:

  1. open my java program
  2. have a combo box full of running programs (runtime exec?)
  3. after i've selected the program thats running, i then want to send that program a key (robot?) after a certain delay repeatedly, shouldn't matter if its minimized, in the background, etc

so i guess my question really is how to select the program to send the key to?

i've been looking at the robot class and i can't seem to find the correct methods i would use

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
genx1mx6
  • 425
  • 1
  • 6
  • 12
  • Pure Java will not be able to do this. You will have to utilize JNI or some package that uses JNI to access and affect the process running. And you will only be able to send Signals, not input; then it is up to the program to handle the Signal correctly. – jco.owens Nov 27 '12 at 20:19

1 Answers1

1

IF I were you, I would use OS specific Runtime methods. Use this to call OS methods.

Look here for some examples.

jakub.petr
  • 2,951
  • 2
  • 23
  • 34