语言: AutoIt

git: https://github.com/jvanegmond/au3_uiautomation

UIAutomation for AutoIt
README.md (中文)





  • 从最新版本的UIAutomation开始
  • 将函数移动到适当的位置并删除具有偏见的函数
  • 创建与AutoIt本机Control和Win函数匹配的其他函数与UIA实现
  • 作为最后一步,升级间谍以更类似于AutoIt间谍的方式工作





UIAWrappers.au3上新的厚包装器。您几乎不需要了解UI自动化概念,建议只熟悉AutoIt Control和Win功能(但不是必需的)。此文件中的函数示例可能是_UIA_ControlSetText,它采用窗口句柄,控件ID(具有精确的AutoIt语法)和要设置的文本。然后,此函数处理通过UIA获取对窗口的引用,控件和设置文本所需的值模式。


本文使用googletrans自动翻译,仅供参考, 原文来自github.com



UI Automation is a somewhat neglected part of AutoIt. The goal for this project is simple: Get the UI Automation library in tip-top shape for inclusion in the AutoIt core libraries, as well as making it a simpler to use this library without understanding UIA core concepts.

Until this is production ready, please use http://www.autoitscript.com/forum/topic/153520-iuiautomation-ms-framework-automate-chrome-ff-ie/

This is the approach taken for this project:

  • Start with the latest release of UIAutomation
  • Move functions to wherever appropriate and delete functions with prejudice
  • Create additional functions which match AutoIt native Control and Win functions with UIA implementations
  • As a final step, upgrade spy to work in a more similar way to AutoIt's spy

The library is now split in these two smaller libraries:


Thin wrapper over UIAutomation. To work with this file you require knowledge of UI Automation concepts. An example of a function in this file might be __UIA_CreatePattern which takes a UIA object and a pattern id and returns the full pattern ready to be used (or sets @error).


New thick wrapper over UIAWrappers.au3. You require little to no knowledge of UI Automation concepts and only familiarity with AutoIt Control and Win functions is recommended (but not required). An example of a function in this file might be _UIA_ControlSetText which takes a window handle, a control id (with exact AutoIt syntax) and the text that you want to set. This function then deals with getting a reference to the window via UIA, the control and the value pattern required to set the text.

Additionally, a small unit testing library is being developed as part of this project called assert.au3. You may find it in the Tests folder.