Accessible Gui text

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Jan 2008
Posts: 5
Reputation: kaloc is an unknown quantity at this point 
Solved Threads: 0
kaloc kaloc is offline Offline
Newbie Poster

Accessible Gui text

 
0
  #1
Jan 23rd, 2008
{ This is an exploratory question to just find out if something is possible. }

The facts are these :
1. The java program is closed source, but is running on an accessible workstation.
2. The gui is written in AWT.
3. OS is windows
4. Windows tools like Spy++ can not "see" the components.
5. Rather not use java access bridge, if it can be helped.

Can text from a java Gui be read by another process?

Example solution: Write a small java program that loops through the awt containers to gather the name fields of each item. ( Not sure if thats possible, which is why I'm asking )
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 765
Reputation: Phaelax is on a distinguished road 
Solved Threads: 38
Phaelax Phaelax is offline Offline
Master Poster

Re: Accessible Gui text

 
0
  #2
Jan 23rd, 2008
In Windows, there might be a way of accessing those components by using the Window ID handle or something. I'm not entirely sure here, this is just a guess.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Accessible Gui text

 
0
  #3
Jan 23rd, 2008
good to see that the built-in security of the JVM is working.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 5
Reputation: kaloc is an unknown quantity at this point 
Solved Threads: 0
kaloc kaloc is offline Offline
Newbie Poster

Re: Accessible Gui text

 
0
  #4
Jan 23rd, 2008
Originally Posted by jwenting View Post
good to see that the built-in security of the JVM is working.
Judging by your comment, you are assuming I'm doing this with nefarious intentions?
I didn't think I came across that way, but you have that right.

The purpose of gathering the text is to produce a report that the program does not natively create. I'm making a side program to meet that need in the mean-time.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 36
Reputation: electron33 is an unknown quantity at this point 
Solved Threads: 4
electron33 electron33 is offline Offline
Light Poster

Re: Accessible Gui text

 
0
  #5
Jan 24th, 2008
Hi. I don't think you can access another process in JVM. They are completely isolated. It is easier to call the Jar file and get the values from here.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 5
Reputation: kaloc is an unknown quantity at this point 
Solved Threads: 0
kaloc kaloc is offline Offline
Newbie Poster

Re: Accessible Gui text

 
0
  #6
Jan 26th, 2008
That is helpful, but the program receives the data from a db, so I guess using java is a dead end.
Last edited by kaloc; Jan 26th, 2008 at 11:46 am.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Accessible Gui text

 
0
  #7
Jan 26th, 2008
Not at all, you just need to stop wanting to do screenscraping like that
Why should we help you create spyware?
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 36
Reputation: electron33 is an unknown quantity at this point 
Solved Threads: 4
electron33 electron33 is offline Offline
Light Poster

Re: Accessible Gui text

 
0
  #8
Jan 26th, 2008
To add a jar in classpath and to access the classes from the methods they provide is naturale to Java. If the host program is the program that connects to the database. There is always classes that provide functions for you to get this datas. Trying to interupt a nother prosess will most likely cause the other prosess to fail. I don'tn recomment to do it your way by hacking your program into a nother process. This is dead before your got started.

What cind of process or program does you want to hack throug process? if uour are trying to access a windows COM object you must have a bridge for this. if you want to use a nother java app. You simply imports the desired jar archive and start coding of connection to the methods provided from this archive.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 5
Reputation: kaloc is an unknown quantity at this point 
Solved Threads: 0
kaloc kaloc is offline Offline
Newbie Poster

Re: Accessible Gui text

 
0
  #9
Jan 27th, 2008
Thanks for you help Electron, as I said this was mostly a "what if" question. Win MFC based windows are an open book compared to java gui's when using C, VB, ect languages. I thought perhaps using a java program might allow you to work with other java processes and thus their Gui, this is not the case. Having never written in Java , I just wasn't sure. I am able to accomplish the goal by other means, so not all is lost.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 1
Reputation: DeMo_BR is an unknown quantity at this point 
Solved Threads: 0
DeMo_BR DeMo_BR is offline Offline
Newbie Poster

Re: Accessible Gui text

 
0
  #10
Jan 28th, 2008
Originally Posted by kaloc View Post
I am able to accomplish the goal by other means, so not all is lost.
Hey could you please explain how you did it?

I've been trying to read stuff from a Java GUI too.
It's for a Java based game, it has this list with item names and prices and I'd like to save a copy of this list for future reference. Of course I'm not gonna copy everything by hand so I had the idea to write a little app to do the dirty job for me.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC