1
This has been a longstanding difficulty for me, and I don't know (even after googling) what the easiest solution to this is.
I have an external program (coherent laser software) that displays some data.
Is there a way how I can access the content of any displayed text in any currently opened window, within windows? Can something like a hook be achieved in powershell?
Ideally I'd want to read out and save the current set-value of the laser, as displayed by the GUI.
1Copies the text of the specified window's title bar (if it has one) into a buffer. If the specified window is a control, the text of the control is copied. However, GetWindowText cannot retrieve the text of a control in another application. https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindowtexta – Mark – 2020-02-21T18:03:14.770
@Mark, the application in the reference is not the Windows API call GetWindowsText(), though it has a similar name. From the URL above: "Copy a window's text content quickly and easily by dragging the application's crosshair icon over the required text source using this portable application." That should have been obvious, because it needs to be installed, and is not native API. – DrMoishe Pippik – 2020-02-21T18:45:00.067