pyautogui库


鼠标:
pyautogui.size() 返回包含屏幕宽与高的像素数的元组
pyautogui.moveTo(x,y,duration=) 将鼠标移动到目标位置 duration=表示执行时间
pyautogui.moveRel() 将鼠标移动到相对位置
pyautogui.position() 返回包含鼠标位置的元组
pyautogui.click(x,y,botton=) 发送虚拟点击
x,y代表鼠标点击位置(x,y为空则在当前位置点击)
botton= 有关键字参数 left middle right 分别代表左键 中键 右键
pyautogui.dragTo(x,y,duration=) 将鼠标拖动到目标位置
pyautogui.dragTo(x,y,duration=) 将鼠标拖动到相对位置
pyautogui.scroll(x) 将鼠标鼠标滚动X位

原文地址:https://www.cnblogs.com/frlblog/p/13217247.html