Теперь Кью работает в режиме чтения

Мы сохранили весь контент, но добавить что-то новое уже нельзя

Как автоматизировать изогнутые движения мыши в Python (с pyautogui или любым другим подобным модулем)?

ПрограммированиеData science+3
Анонимный вопрос
Data Science
  · 11,7 K
Openstack DevOps and IBM/Informix Certified DBA . Phd in Math (Duality of spaces of...  · 29 июл 2022
Выполним следующий код в терминале
import pyautogui
pyautogui.click()
# initialising a variable distance
distance = 200
while (distance):
» » »  # moves the cursor to the right
» » »  pyautogui.dragRel(distance, 0, duration=0.2)
» » »  distance = distance - 5
» » »  # move the cursor down
» » »  pyautogui.dragRel(0, distance, duration=0.2)
» » » # move the cursor to the left
» » » pyautogui.dragRel(-distance, 0, duration=0.2)
» » » distance = distance - 5
» » » # move the cursor up
» » » pyautogui.dragRel(0, -distance, duration=0.2)
Круг в центре от вспышки телефона, мышь тут непричем