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
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