Option Explicit On Error Resume Next Dim WS, IE, Clip, Clipx, Ret Set WS = WScript.CreateObject("WScript.Shell") Ret = WS.Popup( "クリップボード監視 VBS を実行します!" & vbCrLf _ & "終了は Exit をクリップボードにコピー!" _ , 3 _ , "実行表示" _ , 0) Set IE = WScript.CreateObject("InternetExplorer.Application") IE.Visible = False IE.Navigate "about:blank" Do While IE.Busy WScript.Sleep 10 Loop Ret = IE.Document.parentWindow.clipboardData.setData("Text","") Do Clip = IE.Document.parentWindow.clipboardData.getData("Text") If Clip = "Exit" Then Exit Do ElseIf Clip <> Clipx And Left(Clip,4) = "http" Then Call UrlOpen() End If Clipx = Clip WScript.Sleep 1000 Loop IE.Quit Ret = WS.Popup( "クリップボード監視VBSを終了します!" _ , 3 _ , "終了表示" _ , 0) Set IE = Nothing Set WS = Nothing WScript.Quit Sub UrlOpen() Dim IEo Set IEo = WScript.CreateObject("InternetExplorer.Application") IEo.Visible = True IEo.Navigate Clip Do While IEo.Busy WScript.Sleep 10 Loop Set IEo = Nothing End Sub