Question #694126 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/694126

    Status: Open => Answered

TestMechanic proposed the following answer:
1. Define function

def RandomClick(element):
    m = find(element)
    
click(Location(random.randint(m.getX(),m.getX()+m.getW()),random.randint(m.getY(),m.getY()+m.getH())))

2. Then you can use this function in your code

RandomClick("some_picture.png")

-- 
You received this question notification because your team Sikuli Drivers
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