sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #11418
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.