sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #21517
Re: [Question #236003]: i am not able to display the region after find failed
Question #236003 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/236003
Status: Open => Answered
RaiMan proposed the following answer:
There are some non-Sikuli functions, that might produce errors.
On the other hand: this is far too complicated:
img = "targetimage.png"
pat = Pattern(img)
def click(self, targetImage, targetPattern, modifiers=0):
# now you can use targetImage, whereever you need the filename
# if Pattern is not null, it is used for finding,otherwise the image
target = targetPattern if targetPattern else targetImage
if exists(target):
click(getLastMatch())
else:
#not found actions
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.