用于在 Windows 中自动执行桌面事件的 Python 代码

标签 python windows user-interface ui-automation

我想使用 Python 在 Windows 环境中自动执行桌面事件。怎么做?一些示例也会有所帮助。

桌面事件是指控制鼠标和键盘、访问事件窗口属性、双击桌面上的图标、最小化和最大化窗口、通过键盘向输入弹出窗口输入数据等操作.

最佳答案

看看SIKULI .

Sikuli is a visual technology to automate and test graphical user interfaces (GUI) using images (screenshots).

SIKULI 使用了一种非常巧妙的组合截屏,并将它们嵌入到您的 python(实际上是 jython)脚本中。


截图:

enter image description here

并在您的代码中使用它们:

enter image description here

关于用于在 Windows 中自动执行桌面事件的 Python 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11825322/

相关文章:

python - PsychoPy 重新打开窗口

python - 替换以相同模式开头的连续行 block

windows - 适用于 Windows 的优秀开源错误跟踪/问题跟踪软件

Powershell 计时器 - 更新 gui

python - PyTorch - 被覆盖的变量是否保留在图中?

python 将打印输出分配给变量

windows - Windows 是否像 Linux 一样具有 Inode 编号?

windows - 在其他机器上运行C++程序

java - 为什么我总是收到找不到符号错误

user-interface - 用于绘制 GUI 的免费工具