Reputation: 59
For instance, I would like to have my program running in the background and when text is highlighted anywhere, my program will come alive into focus.
Similar to what TinyGrab does, it appears once the user makes a screenshot.
Upvotes: 0
Views: 70
Reputation: 1171
I dont think its a good idea to use a virtual machine to spy the host machine's ui ...
check for the host os/ui for the supported way to access user inputs and then call/execute/signal it somehow to the vm.
Upvotes: 0
Reputation: 68907
That is a very OS specific question you have there and can definitely not be done in native Java. If there is support for what you are looking for by the OS, you will definitely have to use a Java Native Interface (JNI) to write plain C code in order to have access to the low-level OS features provided in C.
Upvotes: 2