1

我想将鼠标相对向右移动。我已经安装了

  • Python(3.8.2(默认,2020 年 7 月 16 日,[GCC 9.3.0])
  • 在 AutoKey 0.95.10 中。

我的原型(下图)完全可以移动。autopilot.input 可以做到这一点,还是我必须尝试不同的东西?

from autopilot.input import Mouse
mouse = Mouse.create()
mouse.move(3600, 80, animate=True, rate=1000, time_between_events=0.01)

我读到:https ://phone.docs.ubuntu.com/en/apps/api-autopilot-development/autopilot.input.Mouse

4

1 回答 1

1

它使用 相对移动鼠标autopilot.input

安装:

sudo apt-get install python3-autopilot

from autopilot.input import Mouse
mouse = Mouse.create()
x, y = mouse.position()
mouse.move(x + 100, y + 100)
于 2020-08-13T13:24:29.530 回答