Suggestion: add "right-click" search

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

User avatar
ZoNi
Silver Member
Silver Member
Posts: 253
Joined: 2002 Nov 03, 14:24
Location: Serbia
Contact:

Suggestion: add "right-click" search

Post by ZoNi »

Can you add option to right-click any file and to have possibility to do web search on custom search engines?

Something I use on Firefox:
Image
User avatar
nikos
Site Admin
Site Admin
Posts: 15808
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

perhaps that's what you want? (VT uploader)
http://www.virustotal.com/advanced.html
User avatar
ZoNi
Silver Member
Silver Member
Posts: 253
Joined: 2002 Nov 03, 14:24
Location: Serbia
Contact:

Post by ZoNi »

I know about VT - and that is not what I need :)

I would like to right-click movie, and to choose to search for subtitles on all4divx.com or more info on IMDb; or to click on a file and to search more info on Google, Wikipedia; to search images on Google Images related to that file (file name, actually) etc...
User avatar
IneedHelp
Gold Member
Gold Member
Posts: 612
Joined: 2010 Feb 04, 02:15
Location: MeanWhile City

Post by IneedHelp »

This looks more like a job for macro scripts, opening the desired site and passing a file's name as the search term.
profess
Silver Member
Silver Member
Posts: 307
Joined: 2003 Oct 06, 11:39

Post by profess »

Isn't there an app that does this already? There should be...

I was thinking of a command line app the gets the filename & sends off to the search engine, not nice, not cool, and not user friendly.

Then I was thinking of some kind of context / shell command handler, which is how it appears in the screenshot of firefox (and how opera handles it) whereby you right-click or double click, the word is highlighted & a menu pops up to search for the file.

There are a couple apps that do this within themselves (anvir task manager free (maybe starter from codestuff)) that allow you to search google et al for the filename to see if they're safe to be running on your system.

Maybe we just need to find the app. Of course x2 has done half the job so would it be easy to create a script or exe *Kilma-cough*) or context menu for it? Incorporated into x2's newish right-click context menu.

As a non-programmer I feel these things can be done easily. Maybe that's why people suggest things left right & centre so flippantly - "aah just move that there & this here & it'll work, add a button there".

Regards all,

Osei *back in that hospital on the BlackBerry again*
Live life...
Kilmatead
Platinum Member
Platinum Member
Posts: 4580
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

profess wrote:As a non-programmer I feel these things can be done easily.
The armchair generals of World War I seemed to have had the same outlook on life - they easily dismissed the "inches-gained/lives-lost" ratio rather conveniently. :wink:

In this case though, you are correct, it's quite simple to do in AutoIt (or any scripting language), though to set up a cascading context menu is a little more problematic (as it involves registry editing).

The important thing is to work out the appropriate site-specific search strings (which I know nothing about)...

Code: Select all

ShellExecute("http://www.bing.com/search?q=" & $CmdLine[1], "", "", "open")

ShellExecute("http://www.Google.com/search?hl=en&q=" & $CmdLine[1], "", "", "open")

ShellExecute("http://www.Google.com/images?hl=en&q=" & $CmdLine[1], "", "", "open")
The first one would open up the default browser with a Bing search, the second a basic Google search, and the third a Google Images search.  From x2, all you'd have to do is pass the filename as an argument using one of the stock tokens, probably using "$B" to supply only the basename (no need for paths/extensions).

Obviously you'd not want all three searches done at the same time, but this is just provided as a proof of concept.  If one really wanted a true cascading contextmenu command, they'd have to look into (for Windows 7 only) this, and supply any site-icons themselves as desired whence building the menus.

(Come to think of it, you'd probably want to enclose the search string in quotes (...&q="""" & $CmdLine[1] & """"), or just replace the spaces in the string with "+" signs or something, but Web-stuff is not exactly my forté, so trial-and-error would ensue... :shrug:)

And, it should be noted, during some of that trial-and-error, Google rudely decided to class my IP as a potential bot on the Google Images one, which gave me a headache.  So experimenters ought be forewarned. :wink:
User avatar
nikos
Site Admin
Site Admin
Posts: 15808
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

I was thinking abput that too, why there isn't a tool already for this task, and after googling into nothing I also thought about a script, and was planning to blog about it but our usual suspect jumped the gun! :)
Kilmatead
Platinum Member
Platinum Member
Posts: 4580
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

nikos wrote:...why there isn't a tool already for this task
How often (outside of checking for suspicious DLL's) does one really need to look up a filename?  The OP's explanation of looking up "legally downloaded" film-titles :D makes sense as one practical purpose though.
User avatar
nikos
Site Admin
Site Admin
Posts: 15808
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

that's what process explorer does, has a command to google some dll or exe
profess
Silver Member
Silver Member
Posts: 307
Joined: 2003 Oct 06, 11:39

Post by profess »

nikos wrote:that's what process explorer does, has a command to google some dll or exe
--

Can we not 'nick' a piece of that program?

Separate dll? Process Explorer is standalone I thought. Or is it using a system dll?

We'd need to search for whole name ie for virus name search or "what is this process" kinda queries.
Live life...
User avatar
ZoNi
Silver Member
Silver Member
Posts: 253
Joined: 2002 Nov 03, 14:24
Location: Serbia
Contact:

Post by ZoNi »

User avatar
nikos
Site Admin
Site Admin
Posts: 15808
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

sounds too complicated to setup, i'll blog an easier solution next week
Kilmatead
Platinum Member
Platinum Member
Posts: 4580
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

Hell, I'll just make a proper one by the weekend, and foil your evil plans. :shrug:
User avatar
ZoNi
Silver Member
Silver Member
Posts: 253
Joined: 2002 Nov 03, 14:24
Location: Serbia
Contact:

Post by ZoNi »

This is interesting  :)

http://filequery.whyeye.org/
Kilmatead
Platinum Member
Platinum Member
Posts: 4580
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

Yeah, that works too - though it's much more fun to just sit down for a couple of hours and create one yourself.  More in the essence of your original request (replete with superfluous icons!), my meagre offering is this:

Image

Edit: This utility and any further updates may be found in this thread from now on.

OnlineLookup Version 1.0.0.1 (Updated 28-Oct-11)
(RAR includes exe, source code, and provider icons)

(Hosted on Google docs, the link is a little weird, just click on "File -> Download Original" to get the archive, or use this temporary mirror instead.)

Fully configurable via the ini, this is pretty simple stuff (though only I could take a 1-line script and inflate it to 200 for no real reason :shrug:).  The context menu itself may only be used in Win7, and to create or remove it all you need to do is click on the exe or run it without any parameters.  There are 6 search providers already defined in the ini, but you can add/remove and rearrange them in the context menu as you please (a maximum of 10 is allowed).

If you don't like context menus, use it as a User Command (for buttons, etc) with the syntax as normal:

> OnlineLookup.exe /Google="$B"

If a path is accidentally supplied it's just stripped, and extensions are stripped by default - if you want extensions, just use:

> OnlineLookup.exe /Ext /Wikipedia="$F"

On the odd chance you want to change the "OnlineLookup" text in the context menu item, just change the name of the EXE to something like "Look Me Up Daddy-O.exe" - more complete instructions on customisation are included inside the supplied ini file.

Enjoy or dismiss, as you may. :wink:
Last edited by Kilmatead on 2011 Nov 08, 11:35, edited 2 times in total.
Post Reply