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
  • I like this one a lot... wonder if you could do the same thing with Freetranslation.com. I'd like to see this as a proper feature in Studio, so just select some text and get a look up that you could use immediately if appropriate without leaving the editor.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • Ok, I didn't even know about the existence of Freetranslation.com! By modifying the Google script only with the website address, I can get the webpage to open and the cursor to be placed in the search field, but I can't seem to paste the clipboard text onto the field. I've tried adding long wait times but I haven't found the right one yet.

    ;Freetranslation.com lookup
    !f::
    OldClipboard:= Clipboard
    Clipboard:= ""
    Send, ^c ;copies selected text
    ClipWait
    Run www.freetranslation.com/search
    Sleep 1000
    Send ^v
    Clipboard:= OldClipboard
    Return

    I think this has a lot of potential, because the suggested translation could even be copied from the website and pasted back into Studio.

    Unfortunately, I have to stop playing with AutoHotkey now and get back to work. : )

    But please share if you get it to work.
  • Here's an updated version of the FreeTranslation script that is working for me. After the initial language setup, the script should open a new page with the same settings every time it's run.

    Alt+F to launch the script after selecting the desired text

    ;Freetranslation.com lookup
    !f::
    Sleep 200
    Send, ^c
    ClipWait
    Run www.freetranslation.com/search
    Sleep 2000
    Send ^v
    Send, +{Tab}
    Send, {Enter}
    Return
Reply Children
No Data