AutoHotkey Community

It is currently May 27th, 2012, 5:49 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: November 11th, 2005, 1:07 pm 
;Following are the scripts which people would find useful for searching using google or wikipedia

;Just select any word or text from any application and press a hotkey, and the google or

;wikipedia results are in your hands

;Hokey is Win + g
#g::

Send,^c

Run, http://www.google.com/search?hl=en&lr=& ... LD%3Aen&q=%Clipboard%

return


;Hokey is Win + w
#w::

Send,^c

Run, http://en.wikipedia.org/wiki/Special:Search?search=%Clipboard%&go=Go

return


; Visit my website at www.sagarmehta.org

; Any comments or suggestions are welcome at sagarmehta@gmail.com


Report this post
Top
  
Reply with quote  
 Post subject: improvement
PostPosted: November 11th, 2005, 1:59 pm 
Offline

Joined: November 4th, 2005, 9:24 am
Posts: 9
Hi there,
I'm using these shortcuts for a long time and I already created some improvements (e.g. open an input box) to them. Maybe they're helpful to you or someone else.

Code:
; ***** Wikipedia functions *****

; Win-w : show input box and search for entered text
#w::Run, "WikiSearch.ahk"


; Win-Shift-w : search for selected text in wikipedia
+#w::
oldClipboard=%clipboard%
Send, ^c
text=%clipboard%
clipboard=%oldClipboard%
Run, http://de.wikipedia.org/wiki/Spezial:Search?search=%text%
;Run, http://de.wikipedia.org/wiki/Spezial:Search?search=%text%&fulltext=Suche
return


; Win-Ctrl-w : open wikipedia.de in web browser
^#w::Run, http://www.wikipedia.at



; ***** english-german functions *****

; Win-e : show input box and translate entered text
#e::Run, "leo_en_de.ahk"


; Win-Shift-e : search for selected text at LEO english-german
+#e::
oldClipboard=%clipboard%
Send, ^c
text=%clipboard%
clipboard=%oldClipboard%
Run, http://dict.leo.org/?lp=ende&lang=de&searchLoc=0&cmpType=relaxed&relink=on&sectHdr=on&spellToler=std&search=%text%
return


; Win-Ctrl-e : open dict in web browser
^#e::Run, http://dict.leo.org



; ***** french-german functions *****

; Win-f : show input box and translate entered text
#f::Run, "leo_fr_de.ahk"


; Win-Shift-f : search for selected text at LEO french-german
+#f::
oldClipboard=%clipboard%
Send, ^c
text=%clipboard%
clipboard=%oldClipboard%
Run, http://dict.leo.org/?lp=frde&lang=de&searchLoc=0&cmpType=relaxed&relink=on&sectHdr=on&spellToler=std&search=%text%
return


; Win-Ctrl-f : open dico in web browser
^#f::Run, http://dico.leo.org


These script comes together with 3 other scripts:

leo_en_de.ahk
Code:
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         Christian Schüler <c_schueler@gmx.at>
;
; Script Function:
;
; Opens an input box and searches at dict.leo.org (english-german) for the entered text.

Gui, Add, Text,, Keywords:
Gui, Add, Edit, w160 vKeywords ym        ; The ym option starts a new column of controls.
Gui, add, button, default, &Translate   ; ButtonSearch will be the label for this button
Gui, add, button, X+15, &Cancel      ; ButtonCancel
Gui, Show,, Translate english-german
return  ; End of auto-execute section. The script is idle until the user does something.

ButtonTranslate:
Gui, Submit  ; Save the input from the user to each control's associated variable.
Run, http://dict.leo.org/?lp=ende&lang=de&searchLoc=0&cmpType=relaxed&relink=on&sectHdr=on&spellToler=std&search=%Keywords%

ButtonCancel:
GuiClose:
ExitApp


leo_fr_de.ahk
Code:
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         Christian Schüler <c_schueler@gmx.at>
;
; Script Function:
;
; Opens an input box and searches at dico.leo.org (german-french) for the entered text.

Gui, Add, Text,, Keywords:
Gui, Add, Edit, w160 vKeywords ym        ; The ym option starts a new column of controls.
Gui, add, button, default, &Translate   ; ButtonSearch will be the label for this button
Gui, add, button, X+15, &Cancel      ; ButtonCancel
Gui, Show,, Translate french-german
return  ; End of auto-execute section. The script is idle until the user does something.

ButtonTranslate:
Gui, Submit  ; Save the input from the user to each control's associated variable.
Run, http://dict.leo.org/?lp=frde&lang=de&searchLoc=0&cmpType=relaxed&relink=on&sectHdr=on&spellToler=std&search=%Keywords%

ButtonCancel:
GuiClose:
ExitApp


WikiSearch.ahk
Code:
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         Christian Schüler <c_schueler@gmx.at>
;
; Script Function:
;
; Opens an input box and searches at www.wikipedia.at for the entered text.
;
 

Gui, Add, Text,, Keywords:
Gui, Add, Edit, vKeywords ym  ; The ym option starts a new column of controls.
Gui, add, button, default, &Search   ; ButtonSearch will be the label for this button
Gui, add, button, X+15, &Cancel      ; ButtonCancel
Gui, Show,, Wikipedia Search
return  ; End of auto-execute section. The script is idle until the user does something.

ButtonSearch:
Gui, Submit  ; Save the input from the user to each control's associated variable.
Run, http://de.wikipedia.org/wiki/Spezial:Search?search=%Keywords%

ButtonCancel:
GuiClose:
ExitApp


Unfortunately I don't know how to insert these as files, so I inserted their source code.

Christian


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Apollo, HotkeyStick, JamixZol and 21 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group