Looking Up Filenames/Extensions Online (A Utility)

A collection of especially useful xplorer² topics and ideas. New users may find it helpful to look here before searching the other forums for information. >>>>>> Please post new material in the relevant forum. (New stuff posted here will be removed.) Thanks. -fg-

Moderators: fgagnon, nikos

Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Looking Up Filenames/Extensions Online (A Utility)

Post by Kilmatead »

This is a small utility which creates/manages a Context Menu entry (Windows 7 only) or a floating menu for an x2 toolbar-button (all Windows versions) which allows the online searching for selected filenames (base-names, full-names, or extensions-only) via a choice of providers, using the default browser.  (Now, say that 10-times fast!)

Context Menu:

Image

Or from a Toolbar-Button...

Image

Download Link: OnlineLookup  / Updated: 22-Jul-13, Version 2.0.5.0
(RAR includes 32 and 64-bit EXE's, source code, and provider definitions/icons)

Image

Image

Image

By default, all pathnames and extensions are stripped from the filename before searching, however an option is available in each provider definition to allow including the file's extension on an entry-specific basis.  Or, you can temporarily force the inclusion of the extension by holding down the <Ctrl> key when clicking the provider-name in the context menu or Toolbar-Button menu.

An option is also available in each provider definition to allow editing/preview of the Text to be searched-for before the browser page opens.  You may also temporarily force this by holding down the <Alt> key when clicking the provider-name in the context menu or Toolbar-Button menu.

Image

Essentially this is all fairly self-explanatory - just look at the definitions already included to see the general format of how to define a new one of your own.  Definitions must include either the '$File$' or '$Ext$' token somewhere in the address string, which shows where the file information is to be inserted in the URL.  Other tokens available are '$Config' (to include a direct link to the main options menu) and '$Sep$' (to add Separators between menu entries).

If you wish to use this from the command-line (for x2 User Commands) just declare the User Command in the usual way:

> OnlineLookup.exe /Floaty "$F"

This would open up the provider-menu list first - if you wish to define a button for a specific provider, use this format:

> OnlineLookup.exe /Wikipedia "$F"

If the provider-name includes spaces, be sure to remove them when giving the option from the command-line - for example, to invoke "Google Images" you would use "/GoogleImages" and so on.

We thank the user ZoNi for inspiring this little distraction, as it's proven more popular an idea than I would have originally thought.  Apologies for the Win7-only context menu, but those are the breaks. :wink:  You may, if you wish, create your own context menu entry by using either x2's built-in Context-Menu or the popular FileMenu Tools utility and the /Floaty command-line option when defining the command.  (This is an entertaining work-around for the XP-users who may be interested and who, for some reason, may not like to use toolbar-buttons.)

For a more detailed list of changes (most not important to the end-user) see the changelog in the source-code file.
Last edited by Kilmatead on 2017 Mar 15, 20:00, edited 16 times in total.
User avatar
IneedHelp
Gold Member
Gold Member
Posts: 612
Joined: 2010 Feb 04, 02:15
Location: MeanWhile City

Post by IneedHelp »

Excellent, but to avoid using the context menu and also creating a button for each provider, could it be possible to pass an extra parameter that tells the application to display the list of available providers and let the user select and execute one (by double clicking/pressing enter)? I ask because I'd like to have this as a single button on one of my toolbars.

*hides in the woods for a week to prevent getting the look from Kilmatead* :D

Also, a parameter which allows the application to retrieve whatever string is in the clipboard, instead of the selected file's name would be great, so ZoNi (and, occasionally, I :D) can press F2, format the file name, copy it to clipboard, press escape to leave the file name unchanged and then search for the memorized string on whatever site he wants using OnlineLookup.
Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

IneedHelp wrote:*hides in the woods for a week to prevent getting the look from Kilmatead*
Too right, you bloody ex-communist!

I've been sittin' on my arse in the cold rain for the last fortnight awaiting random suggestions, and you only now come up with this?  Like last week wasn't good enough?  You had to wait until I ran out of tobacco and am as grumpy as all hell?  <Sigh>

The first one is easy.  So easy, in fact, that if you were to study the code just a little bit, you could probably add it yourself with a minimum of fuss.  Now wouldn't that be special?  Isn't it about time you learned about GUI's?  And, I might add, if you really wanted an option like that, you would have requested it of SetFolderColour by now, no?  (And don't get any smart ideas from that, boy-o. :wink:)

As for the second one... if you're going to use a user-command anyway, what's stopping you from applying the much underused '$?' token from x2?  And, just out of interest, why would you need to edit the filename anyway?  Doesn't that entirely defeat the purpose of searching for "filenames"?  As, if you have to edit them, they aren't filenames anymore, are they?  And, um, not to state the obvious, but if it's already in your clipboard, then isn't it easier to just open an extra tab in your seriously abused browser, and - well - search for it?

These things can easily be added (though I don't personally like the idea of reading the clipboard - that's a wee bit too proletarian for my tastes) - and I have a funny feeling one of Snakebyte's menu thingies kind of allows for something similar to be set up, though I could be wrong there. :shrug:

Then again, I could just be grumpy today, and am somehow missing the usefulness of the above ideas.  But sometimes I get the idea you just like asking for options because you can - not because they have a true fundamental worth unto themselves... :D  (Kierkegård rolls in his grave.)
User avatar
IneedHelp
Gold Member
Gold Member
Posts: 612
Joined: 2010 Feb 04, 02:15
Location: MeanWhile City

Post by IneedHelp »

Kilmatead wrote:Like last week wasn't good enough?  You had to wait until I ran out of tobacco and am as grumpy as all hell?  <Sigh>
I didn't intend to use it. It's more like I'm forcing myself to use it, just like medicine with bad taste.
Kilmatead wrote:The first one is easy.  So easy, in fact, that if you were to study the code just a little bit, you could probably add it yourself with a minimum of fuss.
This is a public tool, I don't want to mess it up yet. I'll work my magic on it after some time, when people start forgetting about it.
Kilmatead wrote:Now wouldn't that be special?  Isn't it about time you learned about GUI's?
I guarantee you do not want to see what happened to Residuum unless your nightmares are horrible enough.
Kilmatead wrote:And, I might add, if you really wanted an option like that, you would have requested it of SetFolderColour by now, no?
No, because Image
Kilmatead wrote:As for the second one... if you're going to use a user-command anyway, what's stopping you from applying the much underused '$?' token from x2?
The additional burden of pasting.
Kilmatead wrote:And, just out of interest, why would you need to edit the filename anyway? Doesn't that entirely defeat the purpose of searching for "filenames"?  As, if you have to edit them, they aren't filenames anymore, are they?
It's a temporary edit, just to get what you want from the file name, then leave it as it is (like, select file, press F2, edit file name if the search string needs to be refined, copy the new name, press escape to cancel changes, press the OnlineLookup button which gets the string from the clipboard, asks what provider you want to use, double click/press enter to select provider, default browser opens with the search result, ???, bankruptcy!)
Kilmatead wrote:And, um, not to state the obvious, but if it's already in your clipboard, then isn't it easier to just open an extra tab in your seriously abused browser, and - well - search for it?
Not even a lvl 666 wizard could pull that one out with just two clicks.
Kilmatead wrote:These things can easily be added (though I don't personally like the idea of reading the clipboard - that's a wee bit too proletarian for my tastes)
This should be available only by forcing it with a parameter like /clip or something, not by default. So cheap methods for cheap users, like me :D
Kilmatead wrote:But sometimes I get the idea you just like asking for options because you can - not because they have a true fundamental worth unto themselves.
Great, now Nikos will never seriously consider my feature requests! Some things should never be disclosed to the public.
User avatar
ZoNi
Silver Member
Silver Member
Posts: 253
Joined: 2002 Nov 03, 14:24
Location: Serbia
Contact:

Post by ZoNi »

Thank you! :)
User avatar
IneedHelp
Gold Member
Gold Member
Posts: 612
Joined: 2010 Feb 04, 02:15
Location: MeanWhile City

Post by IneedHelp »

Actually this tool gave me an idea: instead of having toolbar buttons for every editor, browser, image viewer and player like
Image
I could have a button for each category which displays a list of available options for me to select from.

Of course, each option may have a different command with different parameters, but all needed parameters could be passed at once so every option can work with the parameter it needs. Excellent!

EDIT:
Kilmatead wrote:and I have a funny feeling one of Snakebyte's menu thingies kind of allows for something similar to be set up
Ah, yes, you're right- Menu++
but I think icons can't be assigned to menu entries. Will check.
Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

So, like, does this mean I don't have to keep working on this disembodied list-thing idea of yours for the toolbar button?

Image

(It's working, but it is proving more of a pain in the arse than I would have thought.)

Oh wait, lemme guess - you'd want a configurable utility kinda-thing that could be adapted for any given toolbar button, so you could click on "Editors" and have a floaty-window-thingy popup there with a list of editors in it - no doubt with superfluous icons and stuff, yeah?

If you say "yes" to that, I will officially place a curse on you, 'cause I'm naturally spiteful that way. :D
User avatar
IneedHelp
Gold Member
Gold Member
Posts: 612
Joined: 2010 Feb 04, 02:15
Location: MeanWhile City

Post by IneedHelp »

Kilmatead wrote:So, like, does this mean I don't have to keep working on this disembodied list-thing idea of yours for the toolbar button?
No, no, I'd appreciate you still adding this feature to this tool so I can smuggle some code D:
Kilmatead wrote:If you say "yes" to that, I will officially place a curse on you, 'cause I'm naturally spiteful that way.
I'd say yes just to see if it has any effect :D
Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

IneedHelp wrote:I'd say yes just to see if it has any effect :D
Never, ever, underestimate the power of a man who has run out of tobacco and can't get more until tomorrow - I can levitate the entire African Continent 6-metres above its normal sea-level using nothing but the power of my warped brain at the moment.  Placing a curse on your fibre-optics would be child's play. :wink:  (This is what those anti-drug propagandists never tell you about - they say that withdrawal is a horrible thing [alcoholics, etc.] - but they completely neglect to mention the short-lived sense of ungodly-power that precedes the inevitable crash.  Better than sex, it is, and - well - lasts about as long. :shrug:)
User avatar
kunkel321
Gold Member
Gold Member
Posts: 534
Joined: 2008 Jan 05, 18:58

Post by kunkel321 »

Very nice Kilmatead!  Guess I need to get Win 7 for my home computer...

Are you still working in AutoIt?
Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

kunkel321 wrote:Are you still working in AutoIt?
Considering everyone else around here has wives and mistresses and cats and jobs and mortgages, somebody has to do the dirty work.

...and in a few days there will be a practical solution for non-Win7 systems as well - one I actually like better than the context menu. :wink:
User avatar
ZoNi
Silver Member
Silver Member
Posts: 253
Joined: 2002 Nov 03, 14:24
Location: Serbia
Contact:

Post by ZoNi »

You can add somewhere version number ;)
Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

ZoNi wrote:You can add somewhere version number
Actually, I already did (it's in the title-bar of the main options window).  I've been meaning to update this for awhile, but I have been sleepy recently, given the onset of winter - and sleepy means lazy. :roll:  Sorry for the delay.

So, today the main post at the top of this thread has been updated to the latest version (2.0.4.0) which adds a queer little floating-menu for toolbar buttons, the ability to edit/preview text before actually searching for it, and (for the floating-menu only) Separators within the provider-list.  Plus a few bug-fixes and other stuff not worth mentioning. :wink:

(For a full list of changes since 2.0.2.0 see the changelog at the top of the source-code file itself.)

And just for the record (for anyone keeping track), this script is now officially 1075 lines longer than it needs to be! :D
User avatar
ZoNi
Silver Member
Silver Member
Posts: 253
Joined: 2002 Nov 03, 14:24
Location: Serbia
Contact:

Post by ZoNi »

Go raibh maith agat!  :D
Kilmatead
Platinum Member
Platinum Member
Posts: 4569
Joined: 2008 Sep 30, 06:52
Location: Dublin

Post by Kilmatead »

нема на чему :wink:
Post Reply