Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

help required in Java program  RSS feed

 
Bilal Ali
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Respected Members,
I want to make a program in Java but very much confused that whats the solution, the following is the scenario:

The Java program which I have to make is continiously running in the memory, Suppose I have a third party software running on my PC which contains simply a form and a text feild, I dont have access to the source code or any API of the software , what my Java program has to do is that when user enters some value in the text feild of that software and than selects the value, after selecting the value when the user press ctrl+alt key (pressing both ctrl and alt keys together) than that selected value is taken by my program and assigned to string variable, I am unable to understand that how is this possible, because I dont have access to the source code of that program than how can I get the selected value from a paticular text feild, is it possible that when the user presses ctrl+alt than my program puts the value into clipboard and than retrive the value from clipboard, but in Java how can we access the clipboard ,please members guide me that what can be the solution to this problem.

Thanking You,
Bilal Ali.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd have to guess you can't do that in Java. You might do it in C/C++ that can be integrated with Java through JNI.

For a previous project we looked at commercial products that do this kind of thing: Jacada, e-Glue, OpenSpan, Cicero for a few. Not cheap, not simple.
 
Quintin Stephenson
Ranch Hand
Posts: 44
1
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello there

If you're looking to interact with Ms programs such as Word, Excel etc or any program for that matter that makes use of com objects look no further that JACOB (stands for Java Com Bridge). You will be able to find out details about Jacob and the required downloads at http://sourceforge.net/projects/jacob-project/. It is free open source, so it won't cost you a cent. If you're concerned about the source and stability of Jacob, Oracle make extensive use of Jacob for their Oracle forms product in a library called webutil.

If world can trap the event you require, then this will help you greatly.

Cheers
Q
[ July 11, 2007: Message edited by: Quintin Stephenson ]
 
Bilal Ali
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to both the members for there reply,
To make the situation more clear the thrird party software which is running(lets say it XYZ Product) from where I have to pick the value is also a Java application infact its a Java Swing application,now after getting the value from this application(XYZ Product) through our program running in memory we would apply some validations on the value.One more thing which I want to make clear here is that we needed such program because the vendor of the software(XYZ Product) refused to give us the source code or any PAI for interacting with this software,so we thaught that it would be a nice idea to develop a Java program which would be running in memory like a windows process when the user enters ctrl+alt than our program will trap this event than gets the selected text from the software and than assigned it to the string,once we have this value in our hand than we can apply necessay validations on it.
 
Bilal Ali
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry friends by PAI I mean API in the above message.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16028
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you make a mistake in a message you can later edit it by clicking this icon:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!