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 don't think you need to use:

    Run Chrome.exe

    I'd recommend you to assume that Chrome is already open. Just being simplistic at the beginning, then tuning up the AutoHotkey code once it works.

    Try using Nora's line of code:

    Run www.google.com/search

    This will open a new tab in your default browser (already open or not) with the address and searching parameter provided. But it won't open the tab in the number #1 position.

    Don't forget that Nora's script addresses the steps that consume more time if done manually: copying the selected text, switching to the browser application, opening Google web page, pasting the clipboard content and pressing Enter key. I understand that closing the new tab because it's duplicated somewhere else is one more step, sure, and it can be done with the procedure I posted last week, but I wouldn't say it's the most important. Little by little you catch the monkey.

Children
No Data