in reply to getting text from a window

Converting the text in a window to an image and then attempting to convert it back to text is a very complicated and error prone way of achieving your goal.

If you can select the text you want to capture with the mouse, then you can obtain that selected text within a perl program very easily using Win32::Clipboard.

If the text you wish to capture is non-selectable, then you might need to look at Win32::GUI::Test and the GetWindowText() method.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."