I have a program that displays information(simple text, but not in a txt box, looks like labels in .NET) but has disabled selection and disabled left and right mouse click.
I want to write another program(lets say in C#, but it can be other language also) that acts as a user and writes down the info displayed by the first program in a txt file.
Is there a way that i can get around disabled selection, left and right mouse click?
GetWindowTextwindows API is your friend:you would have to get the handle of the other program’s window then loop on all child windows/controls using
EnumChildWindowsthen get the text callingGetWindowTextagainst all those handles. In some cases you would not get a result as expected I guess or could be that some controls have no handle exposed.for details and answers on how to use
EnumChildWindowssee here:Why is EnumChildWindows skipping children?
have also a look here for some ideas and examples… Why does GetWindowText hang with a "closed" handle but not with a random one