Quick Google look-up of selected text

Press Alt+G after selecting the text

;Google lookup
!g::
OldClipboard:= Clipboard
Clipboard:= ""
Send, ^c ;copies selected text
ClipWait
Run http://www.google.com/search?q=%Clipboard%
Sleep 200
Clipboard:= OldClipboard
Return

 

Edit: Part of the script had been converted to a link and was not showing properly. I've now edited this.

Parents Reply
  • I use a slightly different version of Nora’ script that inserts quotations and replaces spaces and ampersands by their ASCII codes.

    With this sript, you can search for exact matches in Google:

    !g::

        OldClipboard:= Clipboard

        Clipboard:= ""

        Send, ^c ;copies selected text

        ClipWait

        straightQuotes:=`%22

        string = %straightQuotes%%Clipboard%%straightQuotes%

        ;  Replace all spaces with plus sign:

        StringReplace, string, string, %A_SPACE%, +, All

        ;  Replace all ampersands with ascii code:

        StringReplace, string, string, `&, `%26, All

        Run www.google.com/search

        Sleep 200

        Clipboard:= OldClipboard

    Return

Children