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
  • Hi!

    No, unfortunately not :/ It doesn't open Chrome. Very often when I try different script, it also causes the Studio segment to lock, which I don't understand, since as far as I know Ctrl+L is the shortcut for locking a segment, not Alt+e, Alt+f or Alt+h (all different shortcuts I've been trying to use).

    I found that the hotkeys I create work sometimes and sometimes not. So at some point they have worked with maybe Sleep 400, but then all of a sudden, I need Sleep 4000 for it to work, and then of course it is much slower. At this point, I would not use these (except for the google lookup one, which always works).

    I for example created a script for Eur-lex (EU's legislative database) which also only functions sometimes:

    ;Eur-lex.com lookup
    !f::
    Sleep 200
    Send, ^c
    ClipWait
    Sleep 50
    Run http://eur-lex.europa.eu
    Sleep 200
    Send ^l
    Sleep 50
    Send e
    Sleep 50
    Send {Space}
    Sleep 50
    Send ^v
    Sleep 200
    Send {Enter}
    Return

    Here it is annoying, because I don't in fact need to run the website - since I use "e" for it to create a search in the address bar (via the manage search engine function in chrome) - but since the Winactivate doesn't seem to work for me, this is the only way I can do it.

Children
No Data