Match class method saveScreenCapture(path,filename) save image with filename-somevalue but getLastScreenImageFile(path,name) should also give if name is same

Bug #1566812 reported by vijayvyawhare on 2016-04-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Match class method saveScreenCapture(path,filename) saves image with filename-someuniqueNumber ,why? it should save with given name and when i am trying to use getLastScreenImageFile(path,filename) it should give name-someuniqueNumber format instead of that its giving only name.

RaiMan (raimund-hocke) on 2016-04-06
Changed in sikuli:
status: New → Invalid
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
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.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers