🔥 Discover the secret to effortlessly using UIAutomation with AHK 🙌🏼
Channel: AUTOHOTKEY Gurus
Date: 2023-01-12

In this video we reveal the super simple way to use UIA with AutoHotkey.  This approach isn't as robust as the others we've discussed however it is MUCH simpler and easier to understand.  In this video we show how you can use the UIA path to access elements.  This isn't the most robust approach however it is MUCH simpler and easier to understand. 

Check out more of our videos here:  https://the-Automator.com/UIA

If you get value out of this video...  https://www.paypal.me/JoeGlines
Check out more of my scripts at: http://the-automator.com 

TLDR: Using UIA path hierarchy numbers and IDs can help automate programs and quickly identify elements.

1. 00:00 📋 Copy the UIA path hierarchy numbers to the clipboard for easier reading of the control hierarchy.
 1.1 Once connected to an element, use a function to get the UIA path hierarchy numbers.
 1.2 Copying the list of controls to the clipboard allows for easier reading of the hierarchy of the controls.

2. 01:50 🤔 Use the path to identify elements when they don't have a name, automation ID, or control type.
 2.1 In complex programs, when elements don't have a name, automation ID, or control type, the path can be used to identify them.

3. 03:33 🤔 Finding the title bar of an application can help you refer to other elements with a shorter number.
 3.1 You can use the path to get the position of an element, and the dump all to get the elements, but sometimes you don't need to dump.
 3.2 Finding the title bar of an application allows you to refer to the other elements below it with a shorter number.

4. 05:59 🔍 Click 3rd button to maximize Notepad.
 4.1 Click on the third button in the title bar to maximize Notepad.

5. 07:39 🤖 Automating with ID/name is easier than searching for divs.
 5.1 Automating a program with an ID or name is easier than using get Elements by tag name and looking for every div.

6. 08:54 🤖 Automate your program by using positions and IDs to quickly identify elements and avoid confusion from multiple panels and ribbons.
 6.1 Using positions and IDs, you can quickly identify elements in a program and automate it.
 6.2 Having multiple panels and ribbons can lead to a lack of uniqueness and difficulty in choosing the right one.

7. 10:53 🔎 Use the FindFirstByName method to quickly find a parent object with a child named "home".
 7.1 You can Nest them to find a parent with a child named home using the find by method.
 7.2 You can use the FindFirstByName method to search for an object and then perform another search on it in one line.

8. 13:38 💻 A simple approach to managing programs that don't change often.
 8.1 This approach gives a simple and easy way to narrow down a hierarchy on programs that don't change much.