I am creating some scripts to automate repetitive tasks at work, and have been watching Descolada's tutorial series on UIA V2 here: https://www.youtube.com/playlist?list=PLg-VAp_I6_oTfdL9sUqcC7s61jcQW9K38
I am currently attempting to create a script that clicks on the toolbar for an application we frequently use at my place of work. Here is the code in question:
Code: Select all
#Requires AutoHotkey v2.0
#include .\UIA-v2-main\Lib\UIA.ahk
; Define main Window element
AeMShellEl := UIA.ElementFromHandle("Aloha Configuration Center : Quality Dining Burger King ahk_exe AeMShell.exe")
AeMShellEl.ElementFromPath({T:10}, {T:11, i:2}).Click("left") ; Click reports
ControlClick("x60 y170", winTitle) ; Click (hover over?) "Aloha Configuration Center"
ControlClick("x60 y170", winTitle) ; Click Data Distribution
At this time, the script will press "Reports" on the apps toolbar, but the ControlClick commands are not functional, and I am having a difficult time identifying and interacting with the element detailed in UIAViewer as follows:
As you can see, this element is missing an automation ID, UIA path (bottom left), and condition path. The element in question is a button on the toolbar for Aloha Configuration Center and looks like this:
I am new to scripting in general and am currently wrapping up the tutorial series, but none of the information provided so far assists with being able to identify/interact with this element.
Any advice welcomed! I hope to give back to this community for all the assistance I have received at some point in the near future.