I need to use the SDK to pop up the "Advanced Search" dialog window

Have a suggestion for "Everything"? Please post it here.
Post Reply
AutoSoft
Posts: 30
Joined: Fri Jun 09, 2023 9:56 am

I need to use the SDK to pop up the "Advanced Search" dialog window

Post by AutoSoft »

I need to use the SDK to pop up the "Advanced Search" dialog window, code to get various criteria for search options, can I add a function like this?
FOR EXAMPLE, I RUN EVERYTHING IN THE BACKGROUND AS A SERVICE, PERHAPS HIDDEN OR ONLY ON THE TASKBAR TRAY ICON.
I made my own tool to use the SDK to complete the search, but the complex search conditions cannot be directly entered manually.
I want the SDK to pop up the advanced search window and then return the generated conditional code to the SDK.

Code: Select all

EyText=GetSearchInfo_AdvancedSearchWindow
 r = Everything_SetSearchW(StrPtr(EyText))
like this:
i get info from:AdvancedSearchWindow
ext:bas size:0kb-500kb content:<StrFormatByteSize Wininet>
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: I need to use the SDK to pop up the "Advanced Search" dialog window

Post by void »

To open the Advanced Search dialog window:

Code: Select all

// #define EVERYTHING_IPC_ID_SEARCH_ADVANCED_SEARCH  40069
// #define EVERYTHING_IPC_SEARCH_CLIENT_WNDCLASSW    L"EVERYTHING"

SendMessage(FindWindow(EVERYTHING_IPC_SEARCH_CLIENT_WNDCLASSW,0),WM_COMMAND,MAKEWPARAM(EVERYTHING_IPC_ID_SEARCH_ADVANCED_SEARCH,0),0);
AutoSoft
Posts: 30
Joined: Fri Jun 09, 2023 9:56 am

Re: I need to use the SDK to pop up the "Advanced Search" dialog window

Post by AutoSoft »

popup AdvancedSearchWindow?

and wm_gettext from everything url control(search string control)
findwindowex by classname three times?
EVERYTHING》EVERYTHING_TOOLBAR》Edit
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: I need to use the SDK to pop up the "Advanced Search" dialog window

Post by void »

That will work.

You can also use control IDs.
Control IDs will never change between versions.

Check the SDK for a list of Control IDs or use Microsoft Spy++
AutoSoft
Posts: 30
Joined: Fri Jun 09, 2023 9:56 am

Re: I need to use the SDK to pop up the "Advanced Search" dialog window

Post by AutoSoft »

I Test in vba,Failed, no advanced search dialog popped up

Code: Select all

SUB DOTEST()
Dim win_EVERYTHING As Long
Const WM_COMMAND = &H203
Const EVERYTHING_IPC_ID_SEARCH_ADVANCED_SEARCH As Long = 40069
win_EVERYTHING = FindWindow("EVERYTHING", vbNullString)
'Call SendMessage(win_EVERYTHING, WM_COMMAND, MakeWParam(EVERYTHING_IPC_ID_SEARCH_ADVANCED_SEARCH, 0), 0)
Call SendMessage(win_EVERYTHING, WM_COMMAND, EVERYTHING_IPC_ID_SEARCH_ADVANCED_SEARCH, 0)
End Function
Public Function MakeWParam(ByVal uHigh As Long, ByVal uLow As Long) As Long

    Dim foo(0 To 1) As Long
    Dim lRet As Long

    foo(0) = uHigh
    foo(1) = uLow

    Call CopyMemory(lRet, VarPtr(foo(0)), Len(lRet))

    MakeWParam = lRet

End Function
void
Developer
Posts: 16735
Joined: Fri Oct 16, 2009 11:31 pm

Re: I need to use the SDK to pop up the "Advanced Search" dialog window

Post by void »

Does SendMessage return an error?

Was there an opened Everything Search Window?
AutoSoft
Posts: 30
Joined: Fri Jun 09, 2023 9:56 am

Re: I need to use the SDK to pop up the "Advanced Search" dialog window

Post by AutoSoft »

Code: Select all

Dim win_EVERYTHING As Long
Const WM_COMMAND As Long = &H111
Const EVERYTHING_IPC_ID_SEARCH_ADVANCED_SEARCH As Long = 40069
win_EVERYTHING = FindWindow("EVERYTHING", vbNullString)
Call PostMessage(win_EVERYTHING, WM_COMMAND, EVERYTHING_IPC_ID_SEARCH_ADVANCED_SEARCH, 0)
now it's ok ,thank you very much

how to get txt from search address control,like "EVERYTHING_IPC_ID_SEARCH_ADVANCED_SEARCH"?
what's this id?
Post Reply