Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 08, 2016, 01:54:07 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Web search as default when no entry was found?  (Read 1852 times)

highend01

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 112
    • View Profile
    • Donate to Member
Web search as default when no entry was found?
« on: July 10, 2011, 12:33:24 PM »
Hi,

is there any way to use the current text as a web search phrase if no result was found?

Of course without any additional modifiers or by putting something like search in front.

I've used launchy for a long time and I'm used to this feature that you can type in anything
and as long it's not a valid search result it will open the phrase in the current web browser
by hitting enter at the end of the line ;)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Web search as default when no entry was found?
« Reply #1 on: July 11, 2011, 03:26:37 AM »
From the help file, this is a bit tricky but it can be done:

You can now create a special alias called noresults.

If user hits enter when no results are shown, this alias will be triggered.

It can be useful if you want to do something like launch what they type directly (as if it was on path), or invoke another search program, etc.  Just use $$1 in the results.

Important: you need to set the regular expression pattern to:
^noresults (.*)$

So if you wanted to do a web search your result would be just:
http://www.google.com?q=$$1 or http://www.google.com?q=$$u1

(the u1 is for better url encoding of the parameter)

or if you wanted to show the web search inside farr's window use result
igo http://www.google.com?q=$$u1

highend01

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 112
    • View Profile
    • Donate to Member
Re: Web search as default when no entry was found?
« Reply #2 on: July 11, 2011, 04:06:36 AM »
Thanks a lot, mouser :)

Adding this alias works as expected now.

Maybe you could add a little visual tweak to farr to make this special kind of use a bit smoother?

If you type a longer searchstring (e.g.: windows 7 registry hide user) the status bar of farr flickers a lot after you've reached the "7" because no results were found and with every additional letter that you type the statusbar switches between: Found 0 results in 0 seconds. | the directory in which farr is actually searching.

Maybe a user definable delay between 2 keystrokes after farr got two "found 0 results" in a row? Basically something like the "delay search start based on inter-keypress interval and length of search string" for this special kind of purpose?

Tia,
highend

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: -5
  • Posts: 3,397
    • View Profile
    • Donate to Member
Re: Web search as default when no entry was found?
« Reply #3 on: September 13, 2012, 12:10:27 PM »
Mouser, perhaps this should be a configurable option that enables/disables this functionality? With this, I can now totally replace the run dialog as I use it!