I have been working on this script that clicks the wherever the pixel of a certain color is on the screen, but i ran into a problem, when i loop this it takes screenshots, but only about 12 during a 30 second loop when it SHOULD be taking 600 for the program to click on the pixels extremely quickly. im lost
xx = 0
while xx <= 600:
with mss.mss() as sct:
region = {'top': 0, 'left': 0, 'width': 1920, 'height': 1080}
imgg = sct.grab(region)
img1 = mss.tools.to_png(imgg.rgb,imgg.size,output="C:/Users/yaahy/Desktop/scrnshotoutput/imageforgamehack"+str(xx)+".png")
imgname = "C:/Users/yaahy/Desktop/scrnshotoutput/imageforgamehack"+str(xx)+".png"
pxls = find_yellow_pixels(imgname)
pyautogui.click(pxls[0],pxls[1])
time.sleep(.05)
xx = xx + 1