Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;-------------------------------------------------------------------------------
- ; SEARCH SELECTED TEXT IN GOOGLE
- ;-------------------------------------------------------------------------------
- Capslock & g:: ; <-- Google Web Search Using Highlighted Text
- Search := 1
- Gosub Google
- return
- Capslock & y:: ; <-- Youtube Search Using Highlighted TexT
- Search := 2
- Gosub Google
- return
- Capslock & t:: ; <-- Translate Using Highlighted Text
- Search := 3
- Gosub Google
- return
- Capslock & m:: ; <-- Maps Search Using Highlighted Text
- Search := 4
- Gosub Google
- return
- Google:
- Save_Clipboard := ClipboardAll
- Clipboard := ""
- Send ^c
- ClipWait, .5
- if !ErrorLevel
- Query := Clipboard
- else
- InputBox, Query, Google Search, , , 200, 100, , , , , %Query%
- Query := UriEncode(Trim(Query))
- if (Search = 1)
- Address := "http://www.google.com/search?hl=en&q=" Query ; Web Search
- else if (Search = 2)
- Address := "https://www.youtube.com/results?search_query=" Query ; YT Search
- else if (Search = 3)
- Address := "https://translate.google.com/#auto/en/" Query ; Translate
- else
- Address := "https://www.google.com/maps/search/" Query ; Maps Search
- Run, chrome.exe %Address% ; Change this if require different browser search
- Clipboard := Save_Clipboard
- Save_Clipboard := ""
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement