VBS 监控 IE 浏览器URL By Yu2n- 'ListingIeURL.vbs
- On Error Resume Next
- If InStr(1, WScript.FullName, "\wscript.exe", vbTextCompare) > 0 Then
- CreateObject("WScript.Shell").Run "cmd /c title " & WScript.ScriptName & _
- " & cscript //nologo """ & WScript.ScriptFullName & """ & pause", 1, False
- WScript.Quit(0)
- End If
- Dim sURL, sCurURL
- Do
- For Each o In CreateObject("Shell.Application").Windows
- If InStr(1, o.FullName, "\iexplore.exe", vbTextCompare) > 0 Then
- If Not InStr(1, sURL, o.LocationURL, vbTextCompare) > 0 Then
- sCurURL = o.LocationURL
- sURL = sURL & vbCrLf & sCurURL
- WScript.Echo Now() & vbTab & sCurURL
- End If
- End If
- Next
- Loop
复制代码 示例:
打开 IE 浏览器,输入 pc.qq.com ,点击下载 QQ ,可监控到下载地址。如下:- 2015-6-20 11:21:49 http://pc.qq.com/
- 2015-6-20 11:22:06 http://dldir1.qq.com/qqfile/qq/QQ7.3/15047/QQ7.3.exe
复制代码 请自行修改测试。 |