Is there any way to capture data from or manipulate windows that don't belong to your application? For instance, if I want my program to click a button in another program, or read text from a text field in another program, is that possible?
Thanks!
Is there any way to capture data from or manipulate windows that don't belong to your application? For instance, if I want my program to click a button in another program, or read text from a text field in another program, is that possible?
Thanks!
You could use FindWindowEx to find the window (though you'd have to know some specifics of which one you're looking for), and then follow up by using EnumChildWindows on the returned handle from FindWindow to go through all the child windows of that window or even use FindWindow again to find a specific child window, i.e. edit box.
The only real problem is you'd need to know at least either the handle of the control or its ID within the parent window to get the right one.
Keep in mind that there are privacy issues associated with that.
Thanks @nthony, that'll definitely get me started.
manutd, what privacy issues are there?
Thanks!
Well, for one this is the behavior a lot of illicit programs use. Second, you may capture private information that the user does not want you to have.
Ah, gotcha. I'm just trying to simplify a repetitive task for myself.
Oh, that's fine. Just telling you to be aware. I had a friend who almost lost his job for something like that.