Comment 1 for bug 1566812

Revision history for this message
RaiMan (raimund-hocke) wrote :

This is some kind of misunderstanding:
both features have nothing to do with each other.

Both features are implemented in class Region which is the base class of Match (hence each match is also a region with the matched coordinates).

--- saveScreenCapture()
... makes a shot of the given region in that moment and stores it in the given place with the name and a timestamp, to avoid overwriting (mainly to be used with debugging/logging).
It returns the created absolute filename, which has to be kept in your workflow, if you want to use the image file later.

--- getLastScreenImageFile() (agreed: naming is a bit misleading ;-)
... stores the last shot of the region, that was used with the last find operation in that region, to the given path with the given name. As such it corresponds with the feature getLastMatch(), which returns the match of the last find op (found in the LastScreenImage, which is held only in memory). It also returns the generated absolute filename. This feature also is intended to be used for debugging/logging.