I'm relatively new to using AHK, and I'm in the midst of toying around with some scripts. Right now I have a hotkey script that takes text entered in the Windows 10 start menu search and queries it using another search program (example snippet of code below).
Code: Select all
#IfWinActive ahk_exe SearchUI.exe
;some hotkeys
Keep := ClipboardAll
Clipboard :=
SendInput +{Home}
Sleep 5
SendInput ^{c}
ClipWait 0.1
If !ErrorLevel {
; do stuff
The full script works just fine, but I'm wondering if there's a more direct way to interact with the start menu search. ControlGetText would work much better and replace all the Clipboard and SendInput stuff in the above snippet (7 lines of code!) with one command. However, using the AHK windows spy utility, all control information for the Windows 10 start menu (SearchUI.exe) is blank (regardless of where the cursor is, not just the search field itself).
Does anyone know of a way to interface with the start menu using a DLL call or something? Or is this functionality just straight-up blocked by the OS?