Let the user select text from any application (e.g. browser) and pass it to Everything to search

Have a suggestion for "Everything"? Please post it here.
Post Reply
Raindrops
Posts: 247
Joined: Sat Jan 21, 2023 10:04 am

Let the user select text from any application (e.g. browser) and pass it to Everything to search

Post by Raindrops »

Consider this scenario:

We are browsing internet and come across a file name.
We want to check if we have already downloaded that file.

The fastest way to do that would be to select that text and then press a keyboard shortcut. The selected text string should be passed to Everything.
If Everything is not already running, then windows should launch Everything and then enter the selected string in its search bar.

There should be a user option to re-use the existing instance of Everything or launch a new instance of Everything for every search.
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: Let the user select text from any application (e.g. browser) and pass it to Everything to search

Post by void »

There's no mechanism in Windows to copy the selected text from the current window without clobbering the clipboard.

More information to open Everything from your browser here.

https://stackoverflow.com/questions/9047601/is-it-possible-to-get-the-selected-text-of-any-window-including-non-ui-automatio
https://stackoverflow.com/questions/4243944/how-to-get-selected-text-from-any-window-using-ui-automation-c-sharp
Raindrops
Posts: 247
Joined: Sat Jan 21, 2023 10:04 am

Re: Let the user select text from any application (e.g. browser) and pass it to Everything to search

Post by Raindrops »

There is a software called WordWeb (a dictionary-cum-thesaurus app).

It can be invoked without placing the search string on clipboard.
We just select the text and use its global hotkey.
It gets launched and shows the meaning of the selected word.

Logically, that means that Windows allows passing of argument to an app by just selecting the text; without placing it on the clipboard.

It would be nice to add that mode in Everything too!
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Let the user select text from any application (e.g. browser) and pass it to Everything to search

Post by NotNull »

It is likely that WordWeb uses the clipboard too, as it is highly difficult to make it work in all applications/ Windows itself.
Sure, it can be made to work in some applications (Office, notepad, browser) but not everywhere.

I guess WordWeb behaves somnething like the following:
- save original keyboard content
- put selected text on the clipboard
- use the clipboard content to search WorldWeb
- restore original keyboard content

(you could test if this theory is correct by checking a clipboard manager as that will save anything that is put on the clipboard)

Anyway, you can re-create that behaviour with a simple AutoHotKey script (couple of lines of code; probably already on this forum somewhere).
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: Let the user select text from any application (e.g. browser) and pass it to Everything to search

Post by void »

I will consider support for UIA/MSAA to get the selected text.

For now, please consider Autohotkey.
meteorquake
Posts: 501
Joined: Thu Dec 15, 2016 9:44 pm

Re: Let the user select text from any application (e.g. browser) and pass it to Everything to search

Post by meteorquake »

The way to do such things in windows generally is to drag the highlighted text and drop it somewhere.
For example, you drag the text from in a browser over the Everything search bar and let go and it will search for it (if the app is minimised briefly hover over the task bar item to make it pop up then drop). The clipboard is unaffected.
I use this all the time to move text between different applications without impacting the clipboard, for example to search on the web for something in a web page or an external document I just drag the text up into the browser search bar and let go.
d
Raindrops
Posts: 247
Joined: Sat Jan 21, 2023 10:04 am

Re: Let the user select text from any application (e.g. browser) and pass it to Everything to search

Post by Raindrops »

Thanks for this tip!

I tried out this method in a split-screen mode (keeping browser and Everything side by side). It works, but ONLY IF there are no punctuation marks in it.
If the selection is likely to have punctuation marks, then we have to use the SHFT+CTRL+V method.
meteorquake
Posts: 501
Joined: Thu Dec 15, 2016 9:44 pm

Re: Let the user select text from any application (e.g. browser) and pass it to Everything to search

Post by meteorquake »

I'm glad it helped!
I don't have any problem with punctuation marks (certainly on firefox) - what are you finding happens (which browser too)? if you give an example (e.g. URL and text) I can try here!
David
Raindrops
Posts: 247
Joined: Sat Jan 21, 2023 10:04 am

Re: Let the user select text from any application (e.g. browser) and pass it to Everything to search

Post by Raindrops »

I don't think it is browser-dependent issue.

Usually the title is described in this format:
<Title> : <subtitle>

The colon (:) in the middle creates a problem.

Similarly, if the description has any text like [second edition], it prevents Everything from showing results.
Post Reply