Я делал кое-что с pyautogui в pycharm, и мой компьютер продолжает зависать с кодом ниже.После выполнения кода в течение + -8 минут компьютер издает несколько звуковых сигналов, и моя мышь начинает странно двигаться.Поэтому требуется перезагрузка: /.Это очень интенсивный скрипт, но я не понимаю, почему я не могу его правильно запустить.
import pyautogui,time, datetime, random
from PIL import Image
y = 0
take = Image.open("take.png")
print(take.getpixel((3,11)))
while y == 0:
wut1 = pyautogui.pixelMatchesColor(150,45, (215,127,58), tolerance=50)
wut2 = pyautogui.pixelMatchesColor(151, 45,(215, 127, 58), tolerance=50)
wut3 = pyautogui.pixelMatchesColor(152, 45,(215, 127, 58), tolerance=50)
wut4 = pyautogui.pixelMatchesColor(153, 45,(215, 127, 58), tolerance=50)
wut5 = pyautogui.pixelMatchesColor(154, 45,(215, 127, 58), tolerance=50)
if wut1 == True or wut2 == True or wut3 == True or wut4 == True or wut5 == True:
click_time = random.uniform(0.1,0.4)
pyautogui.click(None,None,1,click_time)