Нужен бот на питоне, который будет нажимать на клавиши при достижении стрелкой определенного участка import time import keyboard import pyautogui from concurrent.futures import ThreadPoolExecutor def check_pixel_and_act(x, y, action, key=None): if pyautogui.pixelMatchesColor(x, y, (0, 255, 245), tolerance=7): if action == 'send': keyboard.send(key) time.sleep(0.1) def main(): with ThreadPoolExecutor(max_workers=4) as executor: while not keyboard.is_pressed('q'): realtime = time.time() executor.submit(check_pixel_and_act, 782, 818, 'send', 'a') executor.submit(check_pixel_and_act, 889, 856, 'send', 's') executor.submit(check_pixel_and_act, 999, 856, 'send', 'w') executor.submit(check_pixel_and_act, 1100, 818, 'send', 'd') time.sleep(0.1) print(time.time() - realtime) if __name__ == "__main__": main() Python import time import keyboard import pyautogui from concurrent.futures import ThreadPoolExecutor def check_pixel_and_act(x, y, action, key=None): if pyautogui.pixelMatchesColor(x, y, (0, 255, 245), tolerance=7): if action == 'send': keyboard.send(key) time.sleep(0.1) def main(): with ThreadPoolExecutor(max_workers=4) as executor: while not keyboard.is_pressed('q'): realtime = time.time() executor.submit(check_pixel_and_act, 782, 818, 'send', 'a') executor.submit(check_pixel_and_act, 889, 856, 'send', 's') executor.submit(check_pixel_and_act, 999, 856, 'send', 'w') executor.submit(check_pixel_and_act, 1100, 818, 'send', 'd') time.sleep(0.1) print(time.time() - realtime) if __name__ == "__main__": main() Пытался так, но он очень долго думает, порой дважды нажимает(ибо цвет не сразу меняется на ненужный), зачастую пропускает стрелки
У тя 4 потока одинаковое действие исполняют. По хорошему, каждому потоку нужно дать задание следить за разными линиями. А так, в целом, код ужасен и подход тоже.