Sign in to follow this  
Followers 0
VelvetElvis

Reading Java Window Text

3 posts in this topic

I'm trying to read text from a java window (an IBM Websphere Host On Demand 3270 emulator session.)

The AutoIt window info tool comes up blank for everything except Window info. Here's what I get:

Title: HOST - B (24X80) H166X - B - TNB01870

Class: SunAwtFrame

Position: 206, 105

Size: 808, 582

Style: 0x16CF0000

ExStyle: 0x00000100

Handle: 0x000C0A0A

Currently, my code uses CTRL-A and CTRL-C to select and copy the text to the Windows clipboard for processing, but this is terribly slow when I need to monitor this text often.

I would think that if I can select this text, that there would be some way to read it via AutoIt, but maybe I'm missing something obvious. Any help would be appreciated.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

It's a bit complicated ! Posted Image

See this post

#631547

Summarizing, download and install Java Access Bridge

( Java Access Bridge for the Microsoft Windows Operating System makes it possible for a Windows based Assistive Technology to get at and interact with the Java Accessibility API )

After, run C:\Program Files\Java Access Bridge\JavaMonkey.exe

click on refresh tree and you'll see title and text of your java window ( which is already open )! Posted Image

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

It's a bit complicated ! Posted Image

See this post

#631547

Summarizing, download and install Java Access Bridge

( Java Access Bridge for the Microsoft Windows Operating System makes it possible for a Windows based Assistive Technology to get at and interact with the Java Accessibility API )

After, run C:\Program Files\Java Access Bridge\JavaMonkey.exe

click on refresh tree and you'll see title and text of your java window ( which is already open )! Posted Image

Wow, definitely more to it than I had hoped. I think I'll stick with my capture-to-clipboard method of reading. It isn't terribly fast, but it's easy to code. :-)

Thank you for the article reference.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0