Fantastic Guru,
Unfortunately, I tried your Google, Dictionary and Thesaurus Search scripts and they don't seem to work. Maybe I'm doing something wrong.
Also, I was wondering why would it be better to have the searches appear in a dialog box instead of a webpage? If it appears in a webpage, you can click synonyms of the synonyms or the defnition of a word you don't understand within a definition.
These are the Google, Dictionary and Thesaurus Search Scripts that I use if anyone wants to use them.
Code: Select all
; **********************************************************
; * Google Search of Selected Text *
; **********************************************************
+^a:: ; Hotkey ==> Control + Shift + a
OldClipboard:= ClipboardAll
Clipboard:= ""
Send, ^c
ClipWait 0
If ErrorLevel
{
MsgBox, 16, Warning, No Text Was Selected!, 2
Return
}
Sleep 50
Run "https://www.google.com/search?q=%clipboard%"
Clipboard:= OldClipboard
Return
; **********************************************************
; * Look Up Defintion via Macmillan Dictionary *
; **********************************************************
+^d::
OldClipboard:= ClipboardAll ; Put Clipboard contents temporarily into variable, OldClipboard
Clipboard:= "" ; Empties Clipboard
Send, ^c ; Copies selected text
ClipWait 0
If ErrorLevel ; If nothing was selected, an error dialog appears.
{
MsgBox, 16, Warning, No Text Was Selected!, 2
Return
}
Run, https://www.macmillandictionary.com/search/american/direct/?q=%clipboard%
Sleep 200
Clipboard:= OldClipboard
Return
; **********************************************************
; * Look Up Synonyms via Thesaurus.com *
; **********************************************************
+^s::
OldClipboard:= ClipboardAll
Clipboard:= ""
Send, ^c ;copies selected text
ClipWait 0
If ErrorLevel
{
MsgBox, 16, Warning, No Text Was Selected!, 2
Return
}
Run https://www.thesaurus.com/browse/%Clipboard%
Clipboard:= OldClipboard
Return