Why code in python 3 wont work always?
For example i have "code" that i wrote about year ago. Its bad but its might work. import pyautogui SCREEN = pyautogui.size() POWER = 5 STEP = 32 sideX,sideY = SCREEN sideX-=32 sideY-=32 zone = [] WORG=[sideX/POWER,sideY/POWER] RGB=[0,0,0] pyautogui.FAILSAFE = False for partX in range(POWER): for partY in range(POWER): zone.append((WORG[0]*partX,WORG[1]*partY)) for Nom in zone: X = Nom[0] Y = Nom[1] partX = WORG[0]+X partY = WORG[1]+Y while Y < partY: while X < partX: if pyautogui.pixelMatchesColor((int(X)) ,(int(Y)), RGB ,10): print(X,Y) pyautogui.moveTo(int(X),int(Y)) X+=STEP X=Nom[0] Y+=STEP I try today launch it but its only work in 3 time. I use Python 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] on win32. So i want to know "Why THIS code in python 3 wont work always?"