Read numbers from java window

View: New views
4 Messages — Rating Filter:   Alert me  

Read numbers from java window

by Flyingimmi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello all,

I'm trying to read continuously updated numbers from a java window. ( I don't have the source code for the program)

I was  already able to do this using a custom OCR algorithm but this is a bit slow and too error-prone.

Second I tried to find the memory address where the most recent value was stored and simply checked the
same memory address over and over again. This work as well to some extend , after a changing period of time the new
values where stored a different location and I was not able to get access to the updated values anymore. I can only suspect was happened but I guess some kind of memory allocation. ( I was using the Sun Java Runtime on Ubuntu 8.10 )

Since all my ideas failed so far, I'm curious if there is a chance to read number ( or characters ) from a java window
if I use OpenJDK. Any hint suggesting where I can find information for this task a very much appreciated.

best regards flyingimmi

Re: Read numbers from java window

by Allen-54 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What is a java window ?

Thanks

On Fri, Feb 13, 2009 at 9:20 PM, Flyingimmi <flyingimmi@...> wrote:

>
> Hello all,
>
> I'm trying to read continuously updated numbers from a java window. ( I
> don't have the source code for the program)
>
> I was  already able to do this using a custom OCR algorithm but this is a
> bit slow and too error-prone.
>
> Second I tried to find the memory address where the most recent value was
> stored and simply checked the
> same memory address over and over again. This work as well to some extend ,
> after a changing period of time the new
> values where stored a different location and I was not able to get access
> to
> the updated values anymore. I can only suspect was happened but I guess
> some
> kind of memory allocation. ( I was using the Sun Java Runtime on Ubuntu
> 8.10
> )
>
> Since all my ideas failed so far, I'm curious if there is a chance to read
> number ( or characters ) from a java window
> if I use OpenJDK. Any hint suggesting where I can find information for this
> task a very much appreciated.
>
> best regards flyingimmi
>
> --
> View this message in context:
> http://www.nabble.com/Read-numbers-from-java-window-tp21982814p21982814.html
> Sent from the OpenJDK General discussion mailing list archive at
> Nabble.com.
>
>

RE: Read numbers from java window

by Flyingimmi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello,

I'm sorry for being so imprecise. The program that I'm talking about is a Java application
with a  (swing / awt )GUI . I uploaded a screen shot: http://img10.imageshack.us/img10/5293/screenshotyq1.jpg
sadly I have very little experience with
swing/awt  I use Qt-jambi for GUI development.

Thanks

Date: Fri, 13 Feb 2009 21:50:23 +1100
Subject: Re: Read numbers from java window
From: allenfans@...
To: flyingimmi@...
CC: discuss@...

What is a java window ?
 
Thanks


On Fri, Feb 13, 2009 at 9:20 PM, Flyingimmi <flyingimmi@...> wrote:


Hello all,

I'm trying to read continuously updated numbers from a java window. ( I
don't have the source code for the program)


I was  already able to do this using a custom OCR algorithm but this is a
bit slow and too error-prone.

Second I tried to find the memory address where the most recent value was
stored and simply checked the

same memory address over and over again. This work as well to some extend ,
after a changing period of time the new
values where stored a different location and I was not able to get access to
the updated values anymore. I can only suspect was happened but I guess some

kind of memory allocation. ( I was using the Sun Java Runtime on Ubuntu 8.10
)

Since all my ideas failed so far, I'm curious if there is a chance to read
number ( or characters ) from a java window
if I use OpenJDK. Any hint suggesting where I can find information for this

task a very much appreciated.

best regards flyingimmi

--
View this message in context: http://www.nabble.com/Read-numbers-from-java-window-tp21982814p21982814.html

Sent from the OpenJDK General discussion mailing list archive at Nabble.com.



_________________________________________________________________
http://redirect.gimas.net/?n=M0902xSearchVideo
Videosuche - Ganz einfach mit der Live Search

Parent Message unknown RE: Read numbers from java window

by Flyingimmi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hey John,
thanks for the very
interesting input! As far as I understand by now it's only possible
to access components (for example a label)
if they implement the
Accessible interface. This seems not to be case for the label I'm
trying to read values from, but I will continue to dig deeper into
this topic.
Flyingimmi


Date: Fri, 13 Feb 2009 10:51:29 -0800
From: john.pampuch@...
Subject: Re: Read numbers from java window
To: flyingimmi@...
CC: allenfans@...; discuss@...






 


I'm not an expert on this
topic, but it seems like you could use the accessibility APIs to get
the data you want.  There are probably even better ways too.



   
http://java.sun.com/javase/6/docs/api/javax/accessibility/package-summary.html



-John





_________________________________________________________________
http://redirect.gimas.net/?n=M0902xWLM2009
Neu: Messenger 2009! Hier kostenlos downloaden!