How to get the index completion message as soon as Everything is opened in programming mode?
How to get the index completion message as soon as Everything is opened in programming mode?
I am writing a software to utilize Everything to search for files. I package Everything.exe and Everything64.dll together with the software. When the software runs, it will open the Everything.exe program. However, I cannot obtain correct search information using the API before the index is built. I have not found any API that can retrieve the index building process. My current approach is to open Everything.exe, wait for 1 second, and then call the Everything_GetResultPath method. This method seems to block until the indexing is finished. Is there a better way to do this?
Re: How to get the index completion message as soon as Everything is opened in programming mode?
Is there any process message for listening? So maybe I can listen in Via OnMessagevoid wrote: ↑Wed Aug 28, 2024 9:37 am Please poll the following until it returns true:
Everything_IsDBLoaded()
Re: How to get the index completion message as soon as Everything is opened in programming mode?
There's no broadcast message for when the database is loaded.
Re: How to get the index completion message as soon as Everything is opened in programming mode?
I went to add this feature and found I had already done it in 1348a..
Everything will post an "EVERYTHING_DB_LOADED" message to all top level windows when the database has been loaded.
RegisterWindowMessageW
Everything will post an "EVERYTHING_DB_LOADED" message to all top level windows when the database has been loaded.
RegisterWindowMessageW
Re: How to get the index completion message as soon as Everything is opened in programming mode?
Can you provide sample code for the EVERYTHING_DB_LOADED message?
If I call the API to create an index and save the data to a database file, will the index in the database be automatically updated the next time I search by loading the previously generated database file? I'm concerned that file changes made between the first indexing and the user's second launch of my software might not be captured by the software.
If I call the API to create an index and save the data to a database file, will the index in the database be automatically updated the next time I search by loading the previously generated database file? I'm concerned that file changes made between the first indexing and the user's second launch of my software might not be captured by the software.
Re: How to get the index completion message as soon as Everything is opened in programming mode?
Code: Select all
UINT everything_db_loaded_message = RegisterWindowMessageW(L"EVERYTHING_DB_LOADED");
...
LRESULT WINAPI my_top_level_window_proc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
{
switch(msg)
{
...
}
if (everything_db_loaded_message)
{
if (msg == everything_db_loaded_message)
{
// the Everything database is now loaded.
my_on_everything_db_loaded();
}
}
return DefWindowProc(hwnd,msg,wParam,lParam);
}
Everything manages the database in memory.If I call the API to create an index and save the data to a database file, will the index in the database be automatically updated the next time I search by loading the previously generated database file? I'm concerned that file changes made between the first indexing and the user's second launch of my software might not be captured by the software.
The Everything IPC communicates with Everything and this database in memory.
Everything will save the database to disk when you exit Everything.
Everything will reload the database from disk when you restart Everything.
The Everything IPC will always gather the most recent and up-to-date information.