UIAUTOMATION, how to click a Edit type

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
shawn_xwang
Posts: 2
Joined: 22 Mar 2024, 19:07

UIAUTOMATION, how to click a Edit type

19 Apr 2024, 00:06

Code: Select all

^s:: ;search
UIA := UIA_Interface() ; Initialize UIA interface
;~ WinActivate, ahk_exe PBIDesktop.exe ;ahk_exe notepad.exe
npEl := UIA.ElementFromHandle("ahk_exe PBIDesktop.exe") ; Get the element for the Notepad window
fileEl := npEl.FindFirstByNameAndType("Search", "Edit") ; Find the "File" menu item
fileEl.Highlight()
fileEl.Click()
;~ fileE1.GetClickablePoint().click
;~ fileEl.SetFocus()
;~ msgbox, %fileE1%
;~ fileE1.Value := %Clipboard%
;~ fileEl.Highlight()

return
Hello all
in this lines of code, the clik won't work, but highlight is there, I am not sure where is wrong, is Edit type not clicable or not
in power BI desktop application, the search bar with name of search and type as Edit
image.png
(19.29 KiB) Downloaded 35 times
image.png
(22.16 KiB) Downloaded 35 times

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Aqualest and 109 guests