← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #201531]: Unable to click in random location based on image search.

 

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

Roman Podolyan proposed the following answer:
Or you should correct you function and call it right way:

#-----------
import random

def x():
    return random.randint(0,10)

b = wait("1340794873108.png")
hover(b.getCenter().offset(x(),x()))
#-----------

This works too.

Notice "return" keyword (missing in your code) and mandatory "()" after
"x" when calling it as function.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.