• Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessible text in awt program

 
john lagona
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may seem like a strange question about AWT, but I hope someone can help.

The details are this : I am trying to gather text from a java program that is already running and its an AWT gui. The components I'm interested in are non-editable labels as far as I can tell. The environment is winxp and the idea is to save text into a separate form (for printing). I have local access to the program, but not to its source code.

With that being said, what is the simplest way to accomplish this?
I've read a handful of documents about the Access Bridge and java ferret, but ferret didn't seem to give any results for this example. If someone knows how to do this in a native windows language ( c , ect ) it would be all the better, but I'll take any ideas.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This probably becomes much easier when you can run your code in the same JVM. Would that be possible?

Moving to our Swing/AWT forum...
 
john lagona
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since I'm still pretty new to java, I don't know for sure, but I can always try and see what happens. Is it common practice to try and isolate or protect containers and or components in the JVM? From what I read about shared classes and JVM, it seems due to memory concerns I should be able to find what I need in the JVM.

Is there any small utilities to try to check for that?
 
john lagona
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about I make this a little simpler, is there a way to save all text from a running AWT program to a file? If necessary,.. then lets say I am able to use the same JVM.
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[john lagona:]   is there a way to save all text from a running AWT program to a file?

Definitely is, if you wrote the program.

Sounds like you are looking at a program running on the screen and want to get it to do something, I have found it is easier to start writing your own program unless someone is already handing you the source code for their program and asking you to extend it.

Can you describe the program ?
 
john lagona
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I sent you a pm Nic.
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, I gotta go check my private messages anyway.
 
john lagona
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a screenshot of the program in question.

http://img223.imageshack.us/img223/341/exampleer4.png

Extra info about what I am trying to do is in the first post.
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, this is now really - really simple. I took a glimpse at the screenshot: short enough so that I would not know what the program is doing - I can come up with design ideas faster than I can harvest someone else's from a gui.

In short, just write the progam yourself. Use Java. Assume platfrom independence. Study Fundamentals of the Java Look and Feel; Visual Tour of the Java Look and Feel at Java Look and Feel Design Guidelines

[john lagona:]   The details are this : I am trying to gather text from a java program that is already running and its an AWT gui. The components I'm interested in are non-editable labels as far as I can tell. The environment is winxp and the idea is to save text into a separate form (for printing). I have local access to the program, but not to its source code.

As given above.

[john lagona:]   With that being said, what is the simplest way to accomplish this? I've read a handful of documents about the Access Bridge and java ferret, but ferret didn't seem to give any results for this example. If someone knows how to do this in a native windows language ( c , ect ) it would be all the better, but I'll take any ideas.

Java Ferret Example is an a Java Access Bridge implementation. Java Access Bridgeis a technology to expose the Java Accessibility API (JAAPI) in a Microsoft Windows DLL

To enter your programming challenge set out as post title by this approach to accomplish the design intent set out in the post of Sunday, November 11, 2007 10:31 PM would be parallel in nature to exploring ticketing sellers for Christopher Columbus geographic explorations because you want to spread indiviual choice as a polical alternative in the South Atlantic Anomaly.

Study Java, repost when you have questions.
[ November 25, 2007: Message edited by: Nicholas Jordan ]
 
john lagona
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for trying to help , but I think you misunderstood the goal... that is alright. I am able to accomplish it with this

http://www.electronix.ch/smaragdrobot/
[ November 26, 2007: Message edited by: john lagona ]
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[john lagona:]   Thank you for trying to help , but I think you misunderstood the goal... that is alright. I am able to accomplish it with Smaragd Robot.

I understand your question completely, ( i think ) and respond thus:

[john lagona:]   This may seem like a strange question about AWT, but I hope someone can help.

You are asking for any help, we know this area well. If you think this is bad, you should see what a large project looks like - you have to deal with these fast and effectively.

[john lagona:]   The details are this : I am trying to gather text from a java program that is already running and its an AWT gui. The components I'm interested in are non-editable labels as far as I can tell. The environment is winxp and the idea is to save text into a separate form (for printing). I have local access to the program, but not to its source code.

You are not going to achieve effectiveness on a program to which you have local access to the program, but not to its source code using the tool you found. You are thinking you are going to pull the data out of a program's non-editable labels ? In order to do this, you have to write, compile and test the program yourself. Not that hard if you can find this tool yourself.

[john lagona:]   With that being said, what is the simplest way to accomplish this? I've read a handful of documents about the Access Bridge and java ferret, but ferret didn't seem to give any results for this example. If someone knows how to do this in a native windows language ( c , ect ) it would be all the better, but I'll take any ideas.

I understand what you are thinking here, I want you to provide me a simple MOS ( man on street ) description of what your program does. If the description becomes bogged down in computer science, just skip it an keep moving along providing a full and complete grasp of program concept.

Your program, not some program to which you do not have access to it's source code.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!