Link to home
Start Free TrialLog in
Avatar of darlingm2
darlingm2

asked on

How to get the text out of another program's text box

I need my program to be able to read another program's text box, being shown in that program's window.  I will already have the window's handle for other reasons.

Question 1 - How can I read that information?  I understand the general idea that the other program is going to have certain widgets, some being images, others being buttons, and one being a text box.  How can I get whatever parameter is needed to programatically identify the text box, and how do I read the information in the text box?

Question 2 - This text box will be constantly changing, and I will need to read it every time it changes.  Is there a way I can register an event for when that text box changes, for it to call my program?  (The program I'm reading from doesn't have any type of API to interface with.)  Or, is the only way for me to accomplish this to be reading the text box at a certain interval like every half second or second and see if it changed?  I would prefer for a change in the text box to trigger my program for efficiency.

As you might tell, I don't have any experience with graphical applications or the win32 api, but I do have many years experience in unix based cgi and database programming, so if you can point me in the right direction I can go from there.  Once I know the names of functions I'll be using, I'm fully capable of researching them a bit further.
ASKER CERTIFIED SOLUTION
Avatar of alexcohn
alexcohn
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial