When sikuliX clicks, it clicks the center of the image, I am having a tough time figuring out how to click a random pixel within the selected image.
running = True
import random
outer = 20
while outer > 0:
stop = 0
notFull = True
while (notFull and stop < 50):
if exists(Pattern("1562471887885.png").similar(0.80)):
click(Pattern("1562471887885.png").similar(0.80))
wait(random.randint(2,5))
if exists(Pattern("1562520087969.png").similar(0.80)):
click(Pattern("1562520087969.png").similar(0.80))
wait(random.randint(2,5))
else:
sleep(1)
if(stop > 2):
if exists(Pattern("1562524887502.png").similar(0.80)):
notFull = False
stop = stop + 1
stop = 0
while (stop < 26):
try:
if exists("1562520147478.png"):
keyDown(Key.SHIFT)
click("1562520147478.png")
sleep(random.randint(.1,.3))
keyUp()
if exists("1562520147478.png"):
keyDown(Key.SHIFT)
click("1562520147478.png")
sleep(random.randint(.1,.4))
keyUp()
if exists(Pattern("1562524989139.png").similar(0.80)):
keyDown(Key.SHIFT)
click(Pattern("1562524989139.png").similar(0.80))
sleep(random.randint(.3,.9))
keyUp()
if exists(Pattern("1562545611857.png").similar(0.80)):
keyDown(Key.SHIFT)
click(Pattern("1562545611857.png").similar(0.80))
sleep(random.randint(.3,.9))
keyUp()
except:
sleep(.25)
stop = stop +1;
outer = outer - 1