As Norm states you can do some things with Process, ProcessBuilder and Robot, but not everything. To have tight control over another program, you need to get close to the operating system, something...