(ahk_class:SearchPane Title:Search Pane ahk_exe:explorer.exe)
The problem is that the commands needed to find said HWND only seem to work with UIAccess enabled. These are the methods I have tested: WinGet ControlGet WinExist()... they all resulted in empty output variables.
Code: Select all
DetectHiddenWindows, On
$*Ins::
WinGet, method1, ID, ahk_class SearchPane
ControlGet, method2, Hwnd,,, ahk_class SearchPane
method3 := WinExist("ahk_class SearchPane")
MsgBox,%method1%`n`n%method2%`n`n%method3%
method1=
method2=
method3=
return
Once the HWND is known, I can easily hide the window by setting its WS_VISIBLE style without UIA like this:
Code: Select all
WinSet, Style, -0x10000000, ahk_id %method1%
Is this simply impossible to achieve or is there some kind of workaround to get rid of the search bar? Alternatively, is there a reliable way to enable UIAccess automatically for compiled and uncompiled scripts?