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.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to