Open superhans2 opened 2 months ago
This is because Region getLastMatch() is not implemented (not all Region methods are implemented here, but only relevant ones), and highlight is saving last match for other purposes than accessing the coordinates (this is a side effect and it works as workaround). However, the method can be implemented in sikuliregion file very similar with e.g. def region_getAutoWait(self), and instead use region_getLastMatch().
I can access the coordinates of a previous match using:
lib.appMatch.x
andlib.appMatch.y
however, this will only work if I first runlib.region_highlight(1, useLastMatch=True)
If I do not run this command, the region coordinates being referred to are the screen (at 0,0)
This behaviour works, but I don't like the fact that it is stateful. Is this a bug or is there an alternative method that is intended to be used?
Many thanks