跳转到主要内容

用Python自动化

项目描述

用Python自动化。

这是什么?

这个Python 3软件包旨在帮助您通过Python轻松自动化多个GUI操作,例如点击、移动鼠标、使用键盘等。

如何安装它?

pip install autoit

外部要求?

  • Windows,或

  • Linux

    • xdotool 执行任何 ait 操作。

    • Python的 Xlib 使用 ait.log(鼠标/键盘记录器)。

它看起来像什么?

import ait

# Click wherever the mouse is
ait.click()

# Click with the right mouse button
ait.click('R')

# Click at some position
ait.click(140, 480)

# Click in the center of the screen with the middle button
ait.click(0.5, 0.5, 'M')

# Click 10 pixels below
ait.click(0j, 10j)

# Movement (absolute, percentage and relative) can also be done
ait.move(140, 480)
ait.move(0.5, 0.5)
ait.move(60j, -9j)

# Mouse position can also be retrieved
x, y = ait.mouse()

# Pressing keys can also be done
ait.press('q', '!', '\n')  # Exit vim
ait.press(*'\b' * 10)  # 10 backspaces
# Writing things with the keyboard too
ait.write('Hello world!\n')

项目细节


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源代码分发

autoit-0.2.6.tar.gz (15.7 kB 查看哈希值)

上传时间: 源代码

构建分发

autoit-0.2.6-py3-none-any.whl (15.8 kB 查看哈希值)

上传时间 Python 3

支持