sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #11413
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:
Betty20921 ,
Here is peace of my working code for random clicks:
===
x = random.randint(0,max_x)
y = random.randint(0,max_y)
click(mouseloc.right(x).below(y))
===
where mouseloc is of type Location.
In my current script that location is device emulator top left corner.
Initialization of mouseloc:
===
hover(Pattern("Carrier.png").targetOffset(-36,10))
mouseloc = Env.getMouseLocation()
===
Hope that these ideas will help you.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.