fast google search

Suggestions, feature requests and bug reports.
Post Reply
zebignasty
Posts: 10
Joined: Feb 25th, ’14, 03:50

Post by zebignasty » Feb 26th, ’14, 15:56

Hello,

I wanted to know is there is a way to launch a instant googl search with a string I'll write. I explain.

For example, from anywhere I write gg mytext (then i press enter) and this will launch my browser with a google search "my text".

More of this.
Often, i start to write something in my google address bar without to know (when i start to write) if i want a "search" or a "get kucky". (i know this AFTER the string writed)
Would it be possible to, from anywhere, write gg mytext G (then enter, to launch a search with google) and if i write gg mytext L (then enter, will lauch get lucky) or if a wirte gg mytext W (will laucnch wikipedia searc)

I would like to (if i was working on a doc for example) my text "gg blabla G" be removed from my doc after the searching launched.

Thank you anyway for this beautiful software.
User avatar
Marko
Posts: 1038
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Feb 26th, ’14, 22:36

Here is one idea. You can type "MyText ggg" or "MyText ggw" to search for MyText.

The code selects the word on the left by sending a Ctrl-Shift-Left, copies the selected word to the clipboard by Ctrl-C and finally runs a google/wiki search.

Use the Text Expander to set two entries:

1.
String: ggg
Type: Command
Substitute:

Code: Select all

send ^+{left}
Send ^c
Sleep 50
Run, http://www.google.com/search?q=%clipboard%
Options: Trigger immediately

2.
String: ggw
Type: Command
Substitute:

Code: Select all

send ^+{left}
Send ^c
Sleep 50
Run, http://en.wikipedia.org/wiki/Special:Search?search=%Clipboard%
Options: Trigger immediately
zebignasty
Posts: 10
Joined: Feb 25th, ’14, 03:50

Post by zebignasty » Feb 27th, ’14, 09:00

Thank you a lot :)

I'm encountering two issues :

1 : when i write the code (even if i paste it) into my text expander substitute" and then i save it ; my "susbstitute" is blank whan i want to edit it. It seems to not save the code each time i write it.

2. This command is very good for a word, is there a way to do it for a sentence ? Eventually by taping first a ggg and then my string and then ggg again ?

Thank you :)
User avatar
Marko
Posts: 1038
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Feb 27th, ’14, 09:11

here is the updated command which will search for the sentence on the left from the string.

Code: Select all

send +{Home}^c
Sleep 50
StringGetPos, pos, Clipboard, ., r1
StringTrimLeft, MyClip, Clipboard, pos+1
myclip=%myclip%
Run, http://www.google.com/search?q=%MyClip%
zebignasty
Posts: 10
Joined: Feb 25th, ’14, 03:50

Post by zebignasty » Feb 27th, ’14, 17:48

So great ! Thank you a lot !
Comick
Posts: 2
Joined: Jan 17th, ’15, 14:50

Post by Comick » Mar 7th, ’14, 00:03

This was a great learning excercise for me, thanks. I study more Autohotkey commands as it looks like the possibilities are unlimited and anything can be done... I was already able to adapt the above slightly to suit my needs. Excellent!
ssystem
Posts: 2
Joined: Jul 6th, ’14, 10:41

Post by ssystem » Apr 4th, ’14, 13:20

+1
Post Reply