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
  • February 10, 2016, 10:33:56 PM
  • 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: Winkey g Google Search ahk quickie  (Read 613 times)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 6,666
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Winkey g Google Search ahk quickie
« on: January 14, 2016, 03:27:18 PM »
Here is a quickie hotkey for when you don't have anything open to type into to select text etc.. and want to type in a string to search Google with the default browser.  If the InputBox is closed via OK Button it sounds a tone as indication the browser is being launched.

I just added the snippet below to my general purpose ahk hotkey script.

Code: Autohotkey [Select]
  1. ;Winkey g to search Google using default browser
  2. #g::
  3.   InputBox,SearchVar,Google Search,Enter String for Google to Find
  4.   If (ErrorLevel)
  5.     return
  6.   ;MsgBox I would search Google for %SearchVar%
  7.   Run, http://www.google.com/search?q=%SearchVar%
  8.   SoundPlay,*64
  9.   return

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 6,910
    • View Profile
    • Donate to Member
Re: Winkey g Google Search ahk quickie
« Reply #1 on: January 14, 2016, 04:40:29 PM »
is it easy to change the hotkey combination?

Quote from: Win 10
WinKey+G
Activates the new Xbox game bar to let you record games or take screenshots.
I no longer support DonationCoder's forum

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 9,956
    • View Profile
    • Donate to Member
Re: Winkey g Google Search ahk quickie
« Reply #2 on: January 14, 2016, 05:28:40 PM »
is it easy to change the hotkey combination?

what do you want to change it to?

Screenshot - 2016-01-15 , 00_21_46.png

^This^ is the bit you need to change -- I always forget (I *think Ctrl='^'), and need to look up the AHK site.
I know from the screenshot that:
# = Winkey
and that's it....

so,
only half a solution -- or maybe just a quarter ;-)
Tom

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 6,666
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Winkey g Google Search ahk quickie
« Reply #3 on: January 15, 2016, 06:58:10 AM »
The list of hotkey prefix keys is here:
https://autohotkey.c.../Hotkeys.htm#Symbols

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 5,692
  • Slartibartfarst
    • View Profile
    • Donate to Member
Re: Winkey g Google Search ahk quickie
« Reply #4 on: January 16, 2016, 04:46:59 PM »
For Firefox users, it might be worth noting here about the search prefixes offered by the Instantfox Firefox add-on - http://www.instantfox.net/
You just type in to the URL bar. You could also (say) invoke them with FARR aliases, like the "dc searchstring" I use for searching in the DC forum.
Prefix keys (which can be changed by the user) include, for example:
g » G/Search  | e » eBay
i » G/Images   | b » Bing
m » G/Maps    | yh » Yahoo
y » YouTube    | a » Amazon
t » Twitter        | f » W.f/cast
w » Wikipedia  | c » Calculator
wa » WolframAlpha

I don't always remember the correct prefixes to use, so I have them on a Stick A Note that can be brought up in the top RH corner on any web page in Firefox. (Kudos to @anandcoral.)

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 5,692
  • Slartibartfarst
    • View Profile
    • Donate to Member

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 6,666
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Winkey g Google Search ahk quickie
« Reply #6 on: January 17, 2016, 06:57:22 AM »
You could also (say) invoke them with FARR

Speaking of FARR, one thing I ignored for years was the Windows desktop and folder behavior of searching as you type.  As example I have a folder on the desktop called Programs with categories of shortcuts in other folders.  I was clicking Programs, then clicking System_Utils then clicking DiskTolls.. very slow.  Now I remember to open Programs folder, type sys<enter> then type dis<enter> then click the utility.  Likewise I pit most of my desktop icons in a folder Desktop.  I click to open it, then for Macrium Reflect, instead of hunting it down I type ref<enter> without looking.  Or mbam<enter> for malwarebytes.  For stuff I use frequently but not often enough for a Taskbar shortcut, it obviates the need to search or use the start menu in most cases.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 6,666
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Winkey g Google Search ahk quickie
« Reply #7 on: January 17, 2016, 07:04:01 AM »
An exercise for the reader may be to make a GUI in AHK that has 1/2 dozen search engines and pops up with a hotkey.  The default button would be he default search engine etc..

I haven't looked through the list.  skwire may have already done it.  :)

Doesn't have to be just google type stuff.  You could have an entry for Everything Search, any number of NirSoft utilities etc..  Only thing is opening everything(meaning many different programs) with a hotkey, when you get on a machine without that hotkey utility you hit the key combination from habit.  :)


Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 841
    • View Profile
    • Donate to Member
Re: Winkey g Google Search ahk quickie
« Reply #8 on: January 17, 2016, 01:52:24 PM »
Doesn't have to be just google type stuff.  You could have an entry for Everything Search, any number of NirSoft utilities etc.. 
FARR is easy and great for this. As long as the "targets" (google in browser, everything, ...) support command line parameters we can make FARR aliases to launch them with a searchstring.

For example I use two spaces at the end of a FARR searchphrase as an alias trigger to pass the search on to Everything. Very handy as you can first search with FARR and, if what you're looking for isn't found in a second or two, just tap space space.

To set it up in FARR create a new alias and put this in the regular expressions box:
^(.*)\s\s$
And this in the results box:
Everything Search: $$1 | dolaunch C:\Program files\Everything\Everything.exe -search "$$1"
(Your path to Everything may vary)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 6,666
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Winkey g Google Search ahk quickie
« Reply #9 on: January 17, 2016, 04:33:07 PM »
FARR is easy and great for this.

I understand.  I used aliases with it myself.  But sometimes it is nice to have something dedicated to only a few things or even a single thing.  But my original point was that it is easy to forget you can search for an icon by typing its name.  The tendency is to try to decipher the little graphic.  One can get distracted by the pictures.  If I use larger icons the picture is easier to see but I have fewer of them visible without scrolling, in the case of a folder full of icons.