I would like to randomly click on the captured example example: I capture a box and click on each% random% of that box.
I tried to do it on my own save a random number in a variable, create an if and if it came out for example the number 1 executed the click in the indicated position, as I had to click on configuration of patterns and then displacement of the objective, It takes me a lot of time, I managed to do it, more than 30 clicks randomly, but if I wanted to do it for another objective it would take me too much time to do the previous thing, this I do to make a bot that clicks randomly, since the click is detected in the same position, I have this but it does not work as expected.
from random import randint, uniform,random
r =
w = 50
h = 50
for i in range(5):
x = int(r.w * randint(1, 3))
y = int(r.h * randint(1, 3))
r.click(Location(x, y))
All this I am doing from sikuli, I hope you can help me.