Page 1 of 1

UIA beginner Question

Posted: 05 Apr 2024, 10:34
by tabr3

Code: Select all

uia:=uia_interface()
dvel := uia.elementfromhandle("ahk_exe LosslessScaling.exe")

dvel.FindFirstBy("Name=Close").click()
dvel.FindFirstBy("AutomationId=CloseButton").click()
dvel.findfirstbyAutomationId("CloseButton").click()
dvel.FindFirstBynameandtype("Close","Button").click()
dvel.ElementFromPath("0/").Click("left")
I am starting to learn/fight... with UIA . I believe this target software(losslessscaling) should be easy enough to test with (the UIA tree appears to be simple.) However nothing happens with the code above(click the close button). Can anyone help me identify what wrong with the code? :headwall:
(Note that UIA Viewer is able to highlight the close button by itself... )