I don't know if this is possible (I searched a lot on google), but I want to manipulate the fields of a running program (utorrent). After I open a file (let's say example.torrent), utorrent pops up and asks for a folder to save the files to. What I want to do is to complete that field with a certain path that i give dinamically with my java program and press OK, and all of this should happen in the background (I don't want to see how the file is opened).
Have a look at the Robot class. It can control the mouse position, caret position, key presses ect. Although it is designed for demo purposes I'm sure you could modify it to your needs.