Windows programming question
July 6, 2005 2:32 PM
Subscribe
Windows Programming: how to simulate mouse clicks, button presses, and how to extract data from windows widgets?
I have a need to automate some of the functions of an existing program. In particular, at regular intervals I need to: fill in a text field, press a button, and read from another text field. I know that things of this kind are possible because programs like WinRunner seem to do this. Also, here is an example of a program that does something quite similar to what I want:
UB History (although this is just a general class of problem I'm interested in solving)
Another thing I'd like to be able to do is embed a windows application into another, so that it seems integrated into it. Alternatively, I'd like to be able to take screen dumps of just that window and show them in another program (say, 1-5 times a second). My goal here is to be able to overlay data from my program on top of another program.
posted by RustyBrooks to computers & internet (9 comments total)
The most I ever did was use the API to manipulate the window itself...move it, bring it to the front. You want to get inside of it and get data. Good luck.
I googled a bit for you...here's a Win32 API Programming tutorial.
You will also want to google around and look for stuff related to Windows Handles and Windows API Handles. It also makes it easier if you know a lot about the application you're trying to pull information out of...I seem to remember having a hard time getting the name of the textbox once I had the handle.
Good Luck!
posted by taumeson at 2:59 PM on July 6, 2005