pip install pydirectinput
import pydirectinput
pydirectinput.moveTo(100, 150) # 移动鼠标至坐标100,150
pydirectinput.click() # 点击鼠标左键
pydirectinput.click(200, 220) # 移动鼠标至坐标200,220,并点击左键
pydirectinput.move(None, 10) # 鼠标移动相对y位置
pydirectinput.doubleClick() # 双击鼠标左键
pydirectinput.press('esc') # 按一下esc
pydirectinput.keyDown('shift')#按下shift
pydirectinput.keyUp('shift')#弹起shift
标签:150,鼠标,pydirectinput,Python,shift,PyDirectInput,click,左键
From: https://www.cnblogs.com/congxinglong/p/16931339.html