🔥💻 Unlock the Power of UIA Properties in Your AutoHotkey Scripts!
Channel: AUTOHOTKEY Gurus
Date: 2022-07-25

In this video we discuss how to access properties and perform actions on properties with UIA.
Make sure you stick around ot the end to learn the nuances to take actions and getting text values from properties.

TLDR: Use various methods to locate elements on the screen without an automation id.

1. 00:00 🔎 Use the name of a button to find its location on the screen without an automation id.
 1.1 We'll show you how to access properties from UIA and how to get text from certain values from properties.
 1.2 To target a button without an automation id, you can use its name to find it and then get its location on the screen.

2. 01:31 📐 Get the size and position of an element by loading a library and checking the bounding rectangle with an ahk hk executable.
 2.1 You can get the size and position of an element by loading a library and getting the four points of the bounding rectangle.
 2.2 Grab an executable ahk hk executable (site.exe) and double check that it wrapped the element.

3. 03:19 🔎 Use "dump" and "=" to get an element's properties, but not its bounding rectangle.
 3.1 Search for an element's properties using the "dump" function and an equal sign to get the name, type, and localized control type, but not the bounding rectangle.

4. 04:54 💻 Access current and cached information of a window with thousands of elements using the Windows UIA library's "current name" property.
 4.1 The Windows UIA library has a cache section which can be used to store properties of a window with thousands of elements.
 4.2 You can access current and cached information by using "current name" to access the property name.

5. 06:54 💡 Specify the current element to quickly get information.
 5.1 You can quickly get information from an element by making sure to specify the current element.

6. 08:34 🔎 Use a tree walker to get the bounding rectangles of elements in the discovery section and use hotkeys to click on them, even if they're not clickable.
 6.1 Create a tree walker to get the bounding rectangles of every element in the discovery section of the script.
 6.2 You can save information in a variable and use a hotkey to click on a rectangle, even if it's not clickable at that point.
 6.3 You can use the "find first by element" method to check if a button is off screen, and remember that methods are actions while properties are values.

7. 11:22 🤔 Move the mouse to reveal hidden elements that may not appear until clicked.
 7.1 Elements may not exist until you mouse over them, so even though a dump may run, you may still need to move the mouse together.
 7.2 Sometimes you have to click something for it to show up, such as hover buttons or menus, and you have to take into consideration the elements that are not part of the main program.

8. 12:59 🔎 Check the root element if main element isn't showing up.
 8.1 Check the root element if the main element is not showing up in the program.


Summary for https://youtu.be/9FimiWuexPg by www.eightify.app