To make it easier to maintain the UIA code, I've decided to split the code this way:
This new thread is used for the actual UIA UDFs. Ie. the files stored in Includes folders and named UIA_*.au3 or UIAEH_*.au3.
The UIASpy thread contains only code that is used directly in the UIASpy GUI, but not the UIA UDFs in this new thread.
Using UIA Code contains only example code, but neither UIA UDFs nor UIASpy.
UIA Events contains GUI code to detect events and it contains example code, but neither UIA UDFs nor UIASpy.
This means that every time the code in the UDF files in this new thread is updated (eg. because of Windows 10 feature updates twice a year), you must install the files in the Includes folders in the other threads yourself. The easiest way is simply to copy all UDF files to the Includes folders.
UDF Files
CUIAutomation2.au3 - UIA constants for Windows 7 used in the first examples
CUIAutomation2-a.au3 - The original UIA constants for Windows 7 from junkew's thread
UIA_AccVars.au3 - Used to calculate properties of type VT_UNKNOWN, copied and modified from this thread
UIA_Constants.au3 - UIA constants (copied from UIA header files) up to and including Windows 10 1809
UIA_ConstNames.au3 - Contains functions for converting UIA constants from values to names
UIA_Functions.au3 - A collection of small utility functions
UIA_Functions-a.au3 - First version of utility functions
UIA_ObjectFromTag.au3 - Creates callback objects used in event handlers, copied and modified from this post by trancexx
UIA_SafeArray.au3 - Constants and functions to handle safearrays, copied from this thread
UIA_Variant.au3 - Constants and functions to handle variants, copied from this thread
UIAEH_AutomationEventHandler.au3 - Implements the AutomationEventHandler
UIAEH_FocusChangedEventHandler.au3 - Implements the FocusChangedEventHandler
UIAEH_NotificationEventHandler.au3 - Implements the NotificationEventHandler, published in Windows 10 1709
UIAEH_PropertyChangedEventHandler.au3 - Implements the PropertyChangedEventHandler
UIAEH_StructureChangedEventHandler.au3 - Implements the StructureChangedEventHandler
Folders
The UI Automation projects can be stored in a folder structure this way:
UI Automation\
Code\ - Using UIA code
Events\ - UIA events
Spy tool\ - UIASpy.au3
UDFs\ - UDF files
The UDF files must be installed in Includes\ in the first three folders.
Threads
UIASpy - UI Automation Spy Tool is a GUI tool that provides information about windows and controls and their interconnection and provides functionality to generate sample code. UIASpy is essential for creating UI Automation code.
In Using UI Automation Code in AutoIt you can find and download examples and read information about using UIA code.
UI Automation Events is about implementing event handlers and includes GUIs to detect events.
IUIAutomation MS framework automate chrome, FF, IE, .... created by junkew August 2013 is the first AutoIt thread on UIA code.
Zip-file
The zip contains source code for the UDF files.
You need AutoIt 3.3.12 or later. Tested on Windows XP, Windows 7 and Windows 10.
Comments are welcome. Let me know if there are any issues.
UIAIncludes.7z