WinUtilis
__
Clipboard Web Search Macro
Description:Pressing a shortcut allows you to quickly search the web for the text currently on the clipboard.
This idea is based on the old utilities for Internet Explorer.
Download the .vbs file:clpbs.zip
or Copy code:''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'info@winutilis.net
Dim html, strClp, objShell, strTemp
Set html = CreateObject("htmlfile")
strClp = html.ParentWindow.ClipboardData.GetData("text")
If( strClp <> "" ) Then
strTemp = URLEncode(strClp)
Set objShell = WScript.CreateObject("WScript.Shell")
'normal google search
'objShell.Run "cmd /c start http://www.google.com/search?hl=en^&ie=UTF-8^&oe=UTF-8^&q=""" &strTemp &"""", 2, false
'experimental google search
objShell.Run "cmd /c start http://www.google.com/search?hl=en^&esrch=BetaShortcuts^&q=""" &strTemp &"""", 2, false
Set objShell = Nothing
End If
Function URLEncode(s1)
l = Len(s1)
For i = 1 To l
s = s & "%" & Right("0" & Hex(Asc(Mid(s1, i, 1))), 2)
Next
URLEncode = s
End Function
Set html = nothing
WScript.Quit(0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Instructions:
Configure it like this:
1. Save the code in a text file and give it a name like clpbs.vbs
2. Create a shortcut to the file clpbs.vbs under Start
3. Give it a "Shortcut key" in Properties like: CTRL + ALT + S
4. Done!
Snapshot:
Use it like this:
1. Select a text
2. Press Ctrl + C
3. Press CTRL + ALT + S
4. Done!
|