Как в pyautogui нажать на среднюю кнопку мыши?
Как в pyautogui нажать на среднюю кнопку мыши?
Ответы (1 шт):
Автор решения: Kromster
→ Ссылка
Читаем в документации про клик: https://pyautogui.readthedocs.io/en/latest/mouse.html#mouse-clicks
To specify a different mouse button to click, pass
'left','middle', or'right'for thebuttonkeyword argument:
pyautogui.click(button='middle')
Чтобы просто нажать - читаем чуть ниже: https://pyautogui.readthedocs.io/en/latest/mouse.html#the-mousedown-and-mouseup-functions
If you want to perform these actions separately, call the
mouseDown()andmouseUp()functions. They have the samex,y, andbutton. For example:
pyautogui.mouseDown(button='middle')