Search Google, Google Images & Google Videos for copied Text

Post your working scripts, libraries and tools
sUs1oNe
Posts: 1
Joined: 19 Mar 2017, 01:37

Search Google, Google Images & Google Videos for copied Text

19 Mar 2017, 01:46

Awesome Time Saver for Google

I use Alt + s or i or v

; Search Google for copied Text
!s::
prevClipboard := ClipboardAll
SendInput, ^c
ClipWait, 1
if !(ErrorLevel) {
Clipboard := RegExReplace(RegExReplace(Clipboard, "\r?\n"," "), "(^\s+|\s+$)")
If SubStr(ClipBoard,1,7)="http://"
Run, % Clipboard
else
Run, % "http://www.google.com/search?hl=en&q=" Clipboard
}
Clipboard := prevClipboard
return

; Search Google Images for copied Text
!i::
prevClipboard := ClipboardAll
SendInput, ^c
ClipWait, 1
if !(ErrorLevel) {
Clipboard := RegExReplace(RegExReplace(Clipboard, "\r?\n"," "), "(^\s+|\s+$)")
If SubStr(ClipBoard,1,7)="http://"
Run, % Clipboard
else
Run, % "https://www.google.com.au/search?site=&tbm=isch&source=hp&biw=1536&bih=725&q=" Clipboard
}
Clipboard := prevClipboard
return

; Search Google Videos for copied Text
!v::
prevClipboard := ClipboardAll
SendInput, ^c
ClipWait, 1
if !(ErrorLevel) {
Clipboard := RegExReplace(RegExReplace(Clipboard, "\r?\n"," "), "(^\s+|\s+$)")
If SubStr(ClipBoard,1,7)="http://"
Run, % Clipboard
else
Run, % "https://www.google.com.au/search?&tbm=vid&source=lnms&sa=X&ved&q=" Clipboard
}
Clipboard := prevClipboard
return

sUs1oNe
http://suz1won.deviantart.com/

Return to “Scripts and Functions”

Who is online

Users browsing this forum: gregster and 9 guests