1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
| # 单击鼠标左键,模拟鼠标在点 x, y 的点击。 # OPERATION_WAIT_TIME默认为 0.5,即等待时间默认为0.5秒 Click(x: int, y: int, waitTime: float = OPERATION_WAIT_TIME)
# 单击鼠标中键,模拟鼠标在点 x, y 的点击。 # OPERATION_WAIT_TIME默认为 0.5,即等待时间默认为0.5秒 MiddleClick(x: int, y: int, waitTime: float = OPERATION_WAIT_TIME)
# 单机鼠标右键 RightClick(x: int, y: int, waitTime: float = OPERATION_WAIT_TIME)
# 按鼠标左键 PressMouse(x: int, y: int, waitTime: float = OPERATION_WAIT_TIME)
# 释放鼠标左键 ReleaseMouse(waitTime: float = OPERATION_WAIT_TIME)
# 按鼠标中键与右键,释放鼠标中键与右键 RightPressMouse(waitTime: float = OPERATION_WAIT_TIME) RightReleaseMouse(waitTime: float = OPERATION_WAIT_TIME) MiddlePressMouse(waitTime: float = OPERATION_WAIT_TIME) MiddleReleaseMouse(waitTime: float = OPERATION_WAIT_TIME)
# 鼠标移动,模拟鼠标从当前光标移动到点 x, y。 # moveSpeed:1 正常速度,< 1 移动速度较慢,> 1 移动速度更快。 MoveTo(x: int, y: int, moveSpeed: float = 1, waitTime: float = OPERATION_WAIT_TIME)
# 鼠标左键拖放,模拟鼠标左键从点 x1、y1 拖放到点 x2、y2。 # moveSpeed:1 正常速度,< 1 移动速度较慢,> 1 移动速度更快。 DragDrop(x1: int, y1: int, x2: int, y2: int, moveSpeed: float = 1, waitTime: float = OPERATION_WAIT_TIME)
# 鼠标右键拖放,模拟鼠标右键从点 x1、y1 拖放到点 x2、y2。 # moveSpeed:1 正常速度,< 1 移动速度较慢,> 1 移动速度更快。 RightDragDrop(x1: int, y1: int, x2: int, y2: int, moveSpeed: float = 1, waitTime: float = OPERATION_WAIT_TIME)
# 鼠标中键拖放 MiddleDragDrop(x1: int, y1: int, x2: int, y2: int, moveSpeed: float = 1, waitTime: float = OPERATION_WAIT_TIME)
# 鼠标滚轮向下,模拟鼠标滚轮向下。 # wheelTimes: 轮次,默认为1 # interval: 间隔,默认为0.05 # waitTime: 等待时间,默认为0.5 WheelDown(wheelTimes: int = 1, interval: float = 0.05, waitTime: float = OPERATION_WAIT_TIME)
# 鼠标滚轮向上 # wheelTimes: 轮次,默认为1 # interval: 间隔,默认为0.05 # waitTime: 等待时间,默认为0.5 WheelUp(wheelTimes: int = 1, interval: float = 0.05, waitTime: float = OPERATION_WAIT_TIME)
# 鼠标双击 DoubleClick()
|