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§Hdr=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§Hdr=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§Hdr=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§Hdr=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