Java Application help and suggestions required

Respected Members,

I want to make a program in Java but very much confused that whats the best solution, the following is the scenario:

The Java program which I have to make is continuously running in the memory like a windows service or process I mean when ever I start my computer the program starts running automatically at the back end. Now lets come to the actual problem, actually I have a third party software running on my PC which is basically a Java Swing Application, it contains simply a form and a text field, I dont have access to the source code or any API of the software by which I could have interacted with this application, now we have to apply some necessary validations on the value entered in the text field but sine we didnt have access to the source code or any API so I decided to develop a Java program for the solution, what my Java program(continuously running in memory) has to do is that when user enters some value in the text field of that software and than selects the value, after selecting the value when the user press ctrl+F1 key (pressing both ctrl and F1 keys together) than that selected value is inserted in the System Clipboard and than we can retrieve the value from clipboard, once this value is in our hand we can do any thing with it,

now my question is that how to transfer this value to the clipboard since for this purpose we have to access the selected text in the text field of the active window(Java swing application) than how can we access this active window or selected text using Java, this is just one solution which I have thought and trying to make it possible, please guide me that how can this be possible and what will be the best solution in this scenario.

Thanking You,

Taqi Raza.

[1790 byte] By [taqi10a] at [2007-11-27 10:56:00]
# 1

> b]now my question is that how to transfer this

> value to the clipboard since for this purpose we have

> to access the selected text in the text field of the

> active window(Java swing application) than how can we

> access this active window or selected text using

> Java, this is just one solution which I have thought

> and trying to make it possible, please guide me that

> how can this be possible and what will be the best

> solution in this scenario.

I hate to tell it to you, but if you can't get access to that window and its fields via the OS and implement a key grabber at the same time, you have a problem.

Both of course can't be done in Java.

CeciNEstPasUnProgrammeura at 2007-7-29 12:00:13 > top of Java-index,Java Essentials,Java Programming...
# 2

Thanks for your reply,but whats the reason that we cannot acces the active window using Java , a fellow developer told me that its a piece of cake in VB and accessing active windows and the selected text is no problem if we are usign VB, why does Java lays down such a restriction.

Man I really need some solution to my problem , please suuggest some way out.

taqi10a at 2007-7-29 12:00:13 > top of Java-index,Java Essentials,Java Programming...
# 3

From where did you get that application. As in, who developed that application. What does that application do. You can rewrite that application. There is no way you can get the content of the application's text field. Try searching for some software which can read the keys that you press when that application has focus.

qUesT_foR_knOwLeDgea at 2007-7-29 12:00:13 > top of Java-index,Java Essentials,Java Programming...