jvanegmond/au3_uiautomation

语言: AutoIt

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

AutoIt的UIAutomation
UIAutomation for AutoIt
README.md (中文)

au3_uiautomation

UI自动化是AutoIt的一个有点被忽视的部分。这个项目的目标很简单:获取顶级形状的UI自动化库,以包含在AutoIt核心库中,并使其更简单,无需了解UIA核心概念即可使用该库。

在准备好生产之前,请使用http://www.autoitscript.com/forum/topic/153520-iuiautomation-ms-framework-automate-chrome-ff-ie/

这是该项目采用的方法:

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

该库现在拆分为这两个较小的库:

UIAWrappers.au3:

UIAutomation上的薄包装。要使用此文件,您需要了解UI自动化概念。此文件中的函数示例可能是__UIA_CreatePattern,它接受UIA对象和模式ID并返回准备使用的完整模式(或设置@error)。

UIAutomation.au3:

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

此外,正在开发一个小型单元测试库,作为该项目的一部分,名为assert.au3。您可以在Tests文件夹中找到它。

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

en_README.md

au3_uiautomation

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:

UIAWrappers.au3:

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).

UIAutomation.au3:

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.