Getting information from the screen

I am trying to write a program that locates a particular set of text boxes in another program, and changes the contents. I am a beginner, and I can't find for the life of me how to obtain input from the screen, rather than cin or some file. Or maybe it has to be a file?

I don't really want any sort of advanced code or anything for this, just a general command used for me to research to get started. It will be ran on a Windows computer.

Thanks in advance.
Last edited on
It sounds like you need this then.
https://www.autoitscript.com/site/

Is there something like that for other operating systems other than Windows?
That looks good, but I do have to do it in c++ due to work reasons.
Well does "work" know you're "a beginner" ?

If this is a work-related assignment you are in a bit of a bind, because we can only make generalized suggestions without looking at specific code and system set up, knowing details about the application you are trying to modify, etc.

What you want to do is not simple, so doing it in C++ is going to take some effort.
Convince your boss that modifying the I/O of legacy applications is black art stuff, and it will cost a lot of time (==money) to do it in-house instead of using something like AutoIt or Expect, which are solid, industry-standard programs that do it already, do it well, and have been around for ages.

If, undaunted, you can get access to the other application’s console window handle, then you can use the windows console functions to modify the console display itself. The other application will not know any of this, of course, and will regularly fight you whenever it thinks it ought to update its display.

https://www.google.com/search?btnI=1&q=msdn+Console+Functions

Good luck.
I appreciate your insight. I certainly may try to finagle AutoIt or Expect into usage. I guess I don't HAVE to modify the box, but at least I have to know where the x,y coordinates of the right text box are.

Thank you for a starting point to research.
Topic archived. No new replies allowed.