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")
(Note that UIA Viewer is able to highlight the close button by itself... )