- 博客(0)
- 资源 (3)
空空如也
用VBS获取网页源代码.vbs
用VBS获取网页源代码.vbs
set http=createobject("Microsoft.XMLHTTP") '\\调用XMLHTTP对象
url="http://www.119880.com/qq.txt" '\\赋予变量URL值
Set hhh = createObject("Microsoft.XMLHTTP")
hhh.open "get",url,false '\\定义打开URL方式
hhh.send '\\发送数据
zhi=zhuanghuan(Http.responsebody) '\\变量zhi等于网页内容
Set fso = Wscript.CreateObject("Scripting.FileSystemObject") '声明
Set f = fso.CreateTextFile("txtx.txt") '创建文件,其中f可任意,包含缩略名
f.WriteLine(zhi) '写文件内容,该命令功能太简单,目前看来只能用于TXT文件
f.Close
Function zhuanghuan(vIn)
strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80; Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100; + CInt(NextCharCode))
i = i + 1
End If
Next
zhuanghuan = strReturn
End Function
2013-01-06
VBS检索本地共享.vbs
VBS检索本地共享.vbs
'检索本地共象
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colShares = objWMIService.ExecQuery("Select * from Win32_Share")
For each objShare in colShares
Wscript.Echo "Name: " & objShare.Name
Wscript.Echo "Path: " & objShare.Path
Wscript.Echo "Type: " & objShare.Type
Next
2013-01-06
VBS自动更换IP.vbs
VBS自动更换IP.vbs
'VBS自动更换IP
Dim Wsh
Set Wsh = WScript.CreateObject("WScript.Shell")
Set oIE = CreateObject("InternetExplorer.Application")
for i=1 to 5
wsh.run "Rasdial /DISCONNECT",false,1
wsh.run "Rasdial 连接名字 账号 密码",false,1
oIE.Navigate "http://www.ip138.com/?"&i&""
Call SynchronizeIE
oIE.Visible = True
next
Sub SynchronizeIE
On Error Resume Next
Do While(oIE.Busy)
WScript.Sleep 3000
Loop
End Sub
2013-01-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人