用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 查看哈希值)
关闭
autoit-0.2.6.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a4c27d1f160ac8d4777f9d39228f5e16eb10daf7e2517c70d561835e154a1d68 |
|
MD5 | 17faebf008fbdc006ed89d3030c505cf |
|
BLAKE2b-256 | 80f8ad6a91cbeda01619865c96fa3254bbb1db3e1f6b42a6e6c6a415d75bbae0 |
关闭
autoit-0.2.6-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 29fc0bb71274f5bbe1b5565e926be7d71f270ae850079d83c98d5a13724f31f8 |
|
MD5 | 1cb921c1762fe5d8c4731daa9b30b23f |
|
BLAKE2b-256 | e4cb973d4ade351cd9f880c38fec49a71e0957298f834d15aee35998cb928fce |