Automating third-party applications

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to write a program that can automate another program, by supplying it
with mouse and text events. First, is this possible? Second, how would I go
about doing this?

Basically, the other program is visible on-screen, and I want to have my
program simulate me clicking on it and typing in information.


Also, in order to get feeback, I would like to perform a screen capture on
this other program. How do I do that?
 
jonsolo11 said:
I want to write a program that can automate another program, by supplying
it
with mouse and text events. First, is this possible?

Yes. If the program to be automated supports the accesibilty interface

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msaa/msaaccrf_87ja.asp

it is straightforward.
Second, how would I go about doing this?

If it does not, you can send keyboard and mouse events to an application
with SendInput(). You retrieve text in edit controls by sending a WM_GETTEXT
message.
Also, in order to get feeback, I would like to perform a screen capture on
this other program. How do I do that?

For windows that support either of the WM_PRINT or WM_PRINTCLIENT messages,
you may be able to send them a message. You might want to ask about that in
the graphics group

microsoft.public.win32.programmer.gdi

Regards,
Will
 
Back
Top