Sign in to follow this  
Followers 0
longtex

Unreadable Windows?

8 posts in this topic

I've been looking into wingettext() and controlgettext() usage... and while they seem to work just fine in general, I've run into a couple of apps that don't appear to be(very much) readable... so far...

First is PuTTY... the functions above are fine for the opening window, but once PuTTY connects, the stuff shown in the terminal window just doesn't exist as far as even Au3info is concerned... nothing but the title bar content shows up, no text, no hidden text.

I wouldn't expect to find any specific control data (although the other app, which is a somewhat similar remote terminal, from a company called MediTech, does show a number of buttons as actual controls, but the rest of the content doesn't appear at all), I would be happy to be able to see just the text, since there wouldn't be much of a trick to parse out the needed data from it.

Any ideas?


Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too?

Share this post


Link to post
Share on other sites



the gettext() functions usually only work on native windows controls and windows. I think the putty terminal is neither. It is possible it takes a redirect of std::cout so it might be possible to get something using stdoutread(). If you have time to waid though the putty source and find out what kind of window is made for the terminal it might help...

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

the gettext() functions usually only work on native windows controls and windows. I think the putty terminal is neither. It is possible it takes a redirect of std::cout so it might be possible to get something using stdoutread(). If you have time to waid though the putty source and find out what kind of window is made for the terminal it might help...

Yah, I got that about *gettext() - however, since this IS being displayed by PuTTY (and the other one) through the use of winapi's, there should be something that DOES know what the text is... in the case of the other one, it does in fact show some 20-odd button controls over four or five tabs, so there's at least SOME winapi going on... well, maybe there doesn't HAVE to be, but it's a little hard to imagine that they're handling character generation and lighting up pixels, no?

Hey, thanks for the response - I appreciate it!

Edited by longtex

Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too?

Share this post


Link to post
Share on other sites

If it is using winAPI's then you're correct.

But for example java can make windows and controls not using the standard windows API's which have the same issue so it is possible.

If putty does use Windows API then there should be some way. Is there a particular control you're trying to read other than the terminal window?

Share this post


Link to post
Share on other sites

If it is using winAPI's then you're correct.

But for example java can make windows and controls not using the standard windows API's which have the same issue so it is possible.

If putty does use Windows API then there should be some way. Is there a particular control you're trying to read other than the terminal window?

No - in the case of PuTTY I'm happy just to see the text content. In the other (MediTech MagicWindow) I want to read patient name and account #, but again, I'd be happy just to see the text.

PuTTY's not a big deal - it's open source (I think... probably depends on your definition of those two words together, but it's definitely freely available source) so it's certainly findable code.

The other one is a problem... it's possible we can coerce the information, but I'm hoping to be able to capture the text some way without having to ask their clients to twist their arms... someone somewhere babbled something about reading it out of intercepted packets, but I'm not too sure about that - probably encrypted anyway. The fact that the buttons show up in Au3info as "standard" controls makes me hopeful there's some sort of avoidable obfuscation going on that can be gotten around.


Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Nice to see other people are running into similar problems. I've only written a few Meditech scripts, but they've for the most part met with good success. I cannot read anything in it either, save for what you can see. So, I navigate by sending keystrokes and kicking out reports. I would be better (in some cases) to be able to read directly from the screen, but so far, I'm not sure what's going on here. I can tell you that the window type used for meditech is mostly [CLASS:#32768].

I have a "library" I use code from - pretty much regularly, and I don't mind sharing my work, but you'll need to see if it's any use to you. I'm not really that great a coder, I just try to get stuff done.

well, talk with you later, Good Luck!

By the way, Automate2, an app we use as well, has the same limitations to reading Meditech Client/Server as autoIT does. So it's apparently not an easy issue to get around. I've no idea if Boston Workstation has overcome this limitation or not.

Jack

Edited by laidback01

Share this post


Link to post
Share on other sites

A slightly different track here is to get an external screen capture utility like TextCaptureX from DeskExperience which provides a simple COM interface. So for example the following will capture all text from the active window including a terminal emulator. TextCaptureX costs money though but is quite cheap ! Undoubtedly the same could be achieved in other ways at possibly increased difficulty e.g. parsing a session log or running putty from command line and parsing STDOUT etc ...

$objCapture = ObjCreate("TCaptureX.TextCaptureX")

$text = $objCapture.CaptureActiveWindow

Regards

Dave

Share this post


Link to post
Share on other sites

For some apps, perhaps Putty too, you could do a mouse right-click in the area of interest, then "Select All" option then copy to clipboard then paste somewhere or extract data from clipboard using COM/OLE.

The select all + copy combo could be done with right-mouse clicks and/or with keyboard shortcuts or file menu navigation.

If select all is not possible, one could attempt to select text using mouse movement and left-clicks to highlight start and end text range, if you know the rectangular area to move around.

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