Login / Register
▼
Binary Fortress
Binary Fortress Software
CheckCentral
ClipboardFusion
CloudShow
DisplayFusion
FileSeek
HashTools
LogFusion
Notepad Replacer
Online Base64 Decoder
Online Base64 Encoder
Online JSON Formatter
ShellSend
TrayStatus
VoiceBot
WallpaperFusion
Window Inspector
More Apps...
DisplayFusion
CheckCentral
CloudShow
ClipboardFusion
FileSeek
VoiceBot
WallpaperFusion
▼
Download
Download
Change Log
Download Beta
Beta Change Log
License (EULA)
▼
Features
Features
HotKeys
Macros
Triggers
Clipboard Syncing
Clipboard Manager
Languages
Free vs Pro
Purchase
Screenshots
Apps
▼
Online
Online
Recent Items
Pinned Items
▼
Help
Help Guide
FAQ
Discussions
Contact Us
Find My License
Mailing Address
Advanced Settings
Macros
Languages
Clipboard
Fusion
WARNING: You currently have Javascript disabled!
This website will not function correctly without Javascript enabled.
Title
Message
OK
Confirm
Yes
No
Go to Copied URI In Chrome (or Google search plaintext)
Return to ClipboardFusion Macros
Description
If the text on the clipboard is a URL, this macro will open it in Google Chrome. If it's not a URL, it will do a Google search using that text.
Language
VB (.Net)
Minimum Version
5.7+
Created By
Wakewalker
Contributors
-
Date Created
Jun 22, 2020
Date Last Modified
Jun 22, 2020
Macro Code
Copy
Select All
Toggle Line Wrapping
Imports System Imports System.Net Imports Microsoft.VisualBasic.Interaction Imports System.Diagnostics Public Class ClipboardFusionHelper Public Shared Function ProcessText(text As String) As String Dim url as String = text If Not DoesURLExists(text) Then url = "http://www.google.com/search?q={0}" url = String.Format(url, text.Replace(" "c, "+"c)) End If Process.Start(url) Return text End Function Public Shared Function UrlIsValid(ByVal url As String) As Boolean Dim is_valid As Boolean = False If url.ToLower().StartsWith("www.") Then url = _ "http://" & url Dim web_response As HttpWebResponse = Nothing Try Dim web_request As HttpWebRequest = _ HttpWebRequest.Create(url) web_response = _ DirectCast(web_request.GetResponse(), _ HttpWebResponse) Return True Catch ex As Exception Return False Finally If Not (web_response Is Nothing) Then _ web_response.Close() End Try End Function Public Shared Function URLExists(ByVal url As String) As Boolean Try Dim Request As Object Dim ff As Integer Dim rc As Object Request = CreateObject(url) With Request .Open("GET", url, False) .Send() rc = .StatusText End With Request = Nothing If rc = "OK" Then URLExists = True EndNow: return URLExists Catch ex As Exception return false End Try End Function Public Shared Function DoesURLExists(ByVal url As String) As Boolean Dim responsea as Boolean = false Try Dim webRequest As System.Net.WebRequest = System.Net.WebRequest.Create(url) webRequest.Method = "HEAD" Dim response As System.Net.HttpWebResponse = CType(webRequest.GetResponse, System.Net.HttpWebResponse) If (response.StatusCode.ToString = "OK") Then responsea = true End If Catch ex As Exception Return responsea End Try return responsea End Function End Class
Copyright © 2007-2021 Binary Fortress Software
•
News
•
Discussions
•
FAQ
•
Support
•
Privacy
•
ToS
•
Get Binary Fortress Merch