Answers for "python controlling mouse"

10

python click on screen

import pyautogui

pyautogui.click(100, 100)
pyautogui.moveTo(100, 150)
pyautogui.moveRel(0, 10)  # move mouse 10 pixels down
pyautogui.dragTo(100, 150)
pyautogui.dragRel(0, 10)  # drag mouse 10 pixels down
Posted by: Guest on April-17-2020
0

how to move mouse python

import pyautogui
pyautogui.moveTo(100, 100, duration = 1)
Posted by: Guest on March-28-2021
2

mouse module for python

# drag from (0, 0) to (100, 100) relatively with a duration of 0.1s
mouse.drag(0, 0, 100, 100, absolute=False, duration=0.1)
Posted by: Guest on March-13-2021

Python Answers by Framework

Browse Popular Code Answers by Language