| View previous topic :: View next topic |
| Author |
Message |
tazmanian
Joined: 17 Nov 2007 Posts: 16
|
Posted: Sat Dec 29, 2007 7:53 pm Post subject: Using #g to search Google but met a stumbling block :-( |
|
|
I am trying to use the combination #g for searching Google for something. For example, you would highlight text and then press #g.
| Code: |
#g::
Send, ^c
IfWinExist Firefox
Run, Firefox http://www.google.com/search?q=%Clipboard%
else
Run, http://www.google.com/search?q=%Clipboard%
Return
|
If firefox is open then it will use that otherwise it will use Internet Explorer (which loads faster). It does not work if Firefox is open because I am using the RUN command wrongly. Is there anyway to use the RUN command or any similar one where you can pass in an argument which it uses?
P.S I got this brilliant idea of life hacker:
http://www.lifehack.org/articles/technology/10-ways-to-use-autohotkey-to-rock-your-keyboard.html |
|
| Back to top |
|
 |
ManaUser
Joined: 24 May 2007 Posts: 906
|
Posted: Sat Dec 29, 2007 8:29 pm Post subject: |
|
|
It looks like maybe all you need to do is use the full path to Firefox. That is:
| Code: | | Run, C:\Program Files\Mozilla Firefox\Firefox.exe http://www.google.com/search?q=%Clipboard% |
(Adjust if yours is in a different directory, of course.) |
|
| Back to top |
|
 |
tazmanian
Joined: 17 Nov 2007 Posts: 16
|
Posted: Sat Dec 29, 2007 8:39 pm Post subject: |
|
|
Thanks Mana!
It now works perfectly. Before it was searching the registry for firefox ...google... whereas now it is using the actual exe.
| Code: |
#g::
Send, ^c
IfWinExist Firefox
Run, C:\Program Files\Mozilla Firefox\Firefox.exe "www.google.com/search?q=%Clipboard%"
else
Run, www.google.com/search?q=%Clipboard%
Return
|
|
|
| Back to top |
|
 |
|