Is there a way to programattically control a SearchEverything Window?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
hellen_dorandt89
Posts: 52
Joined: Sun Apr 03, 2022 5:52 pm

Is there a way to programattically control a SearchEverything Window?

Post by hellen_dorandt89 »

I know there is a CLI version of Everything but that is just for getting search result in a terminal window right? not actually controlling the graphical Everything window right?
What I want to do is to deeply integrate the SearchEverything window into a number of tools I use.

Image

For example if I am in some software with those awfull file selection GUIs (above picture) and for some reason I have a string for a path on my drive C:\Users\user1\Documents\Assets\Car material refs.
I would like to pass this path to everything in the format PIC:"C:\Users\user1\Documents\Assets\Car material refs" then after activate the Everything window. Which is much more suited for discovery. Returning the final selected files path to the initial window from Everything would not be an issue for me.

A good example of what I have in mind is Directory Opus and its OpusRT Cli tool. Directory Opus is an advanced file browser for windows. Its Cli tool DopusRT makes it possbile to entirely control any or all Directory Opus windows, you can for example:
- Get the path of the selected file in the most recently active window
- Get a selected files path from a specific window
- Set any window or tab to new path (even paths store in the clipboard)
Essentially being able to do everything one can do manually programatically.

It would be nice if there was some way to to operate an Everything window remotely, reading the docs I came acrross IPC, reading up on this I am not sure what is it specifically, is IPC what am looking for in this case? Or will the everything SDK allow me to achieve this? what about this URL scheme that is mentioned in the everything general, options page?

Any help would be greatly appreciated!
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Is there a way to programattically control a SearchEverything Window?

Post by NotNull »

hellen_dorandt89 wrote: Sat May 21, 2022 2:38 pm know there is a CLI version of Everything but that is just for getting search result in a terminal window right? not actually controlling the graphical Everything window right?
Right.
The command-line version - ES.exe - talks to a running Everything to get a list of files from Everything's database.


hellen_dorandt89 wrote: Sat May 21, 2022 2:38 pm reading the docs I came acrross IPC, reading up on this I am not sure what is it specifically, is IPC what am looking for in this case? Or will the everything SDK allow me to achieve this?
IPC is Inter-Process Communication; several methods that Windows offers to let processes exchange information. It is not specific to Everything.


When you are writing your own applications, you can use the APIs in the Everything SDK to "talk to" a running Everything to get information out of it's database (similar to the way ES.exe operates).
AFAIK, it is not meant to "remote-control" the Everything GUI.


what about this URL scheme that is mentioned in the everything general, options page?
that URL scheme (ES:) works like http:, you can type ES:something in the address bar of the browser and Everything will be started with a search for "something". Works in Windows too, like in File Explorer or Win+R.




What you need are the command-line options of Everything.exe.
These are the ones for Everything 1.4 and these are the (current) ones for Everything 1.5.

With that you can use - for example - AutoHotKey (AHK) to start Everything with a command-line like the following:

Code: Select all

"c:\path to\Everything.exe  -newwindow  -search "pic: """c:\your folder\""" "
AHK is also capable of reading the current folder, so you should be able to press a chosen keybard shortcut to automate all this. Probably 10-20 lines of code.

Instead of AHK, a tool like Textify is also suited for this scenario. Even better imo.
Workflow would be something like the following:
- Shift-middleclick the folder in the dialog, press a button and Everything will open with that search




In a future version of JumpToFolder it will be possible to search in the active folder instead of system-wide.
So with that, the workflow could be:
- In the "Import Images" dialog, click the Browse button
- right-click an empty part of the file list
- select JumpToFolder
(Everything will be started, searching files in that folder; limited to pictures is also possible)
- Select your files
- ?
hellen_dorandt89
Posts: 52
Joined: Sun Apr 03, 2022 5:52 pm

Re: Is there a way to programattically control a SearchEverything Window?

Post by hellen_dorandt89 »

Outstanding Mr NotNull. This just abot as thorough as an answer as I was hoping to get. Much appreciated!
In my early "Research" I had confused the **ES**.Exe with **Everything**.Exe.

I was able to take a quick look at Everything.exe 1.5 and you are quite right its exactly what I was looking for!

Your tool looks quite amazing, I run into it at the Directory Opus and Autohotkey forums and was quite impressed with it when I first saw it, am glad to hear that your coninuing to improve it! I look forward to seeing it.

Thansk so much for helping me with this!
Post Reply