_SCREENIMAGE is a tool for capturing the currect Desktop display, and can therefore be used to capture the current program window display as we also know the top left and bottom right window positions.
should return an image of the running program's screen image.
_SCREENX/Y return the program window's upper left corner horizontal/vertical positions on the desktop
_WIDTH/HEIGHT return the width/height of the present SCREEN
XBorder%%/YBorder%% are constant offsets to account for the widths of the window borders to the left and at the top.
I experimented with values of XBorder%% & YBorder%% to get the image I& exactly that of the program's window image, and I found that the values required to capture the exact full window did not equate to the widths of the window borders (close-ish, but not exact).
Is there a way to capture the exact image in the running program's window without having to use the above which requires manually adjusting the values of XBorder%% & YBorder%%? I imagine that, in any case, the window borders are set by the operating system. I have been through the Wiki, and do not see a "capture the image inside the present window" function.