魔域脚本辅助 全自动做学

发布时间:2021-12-20 来源:脚本之家 点击:

使用方法为:点“开始”,选“运行”,打开“regedit”,回车即可进入注册表编辑器
' +----------------------------------------------------------------------------+
' | Contact Info |
' +----------------------------------------------------------------------------+
' Author: Vengy
' modiy:lcx
' Email : cyber_flash@hotmail.com
' Tested: win2K/XP (win9X not tested!)


Option Explicit


' +----------------------------------------------------------------------------+
' | Setup constants |
' +----------------------------------------------------------------------------+
Const conBarSpeed=80
Const conForcedTimeOut=3600000 ' 1 hour


' +----------------------------------------------------------------------------+
' | Setup Objects and misc variables |
' +----------------------------------------------------------------------------+
Dim spyPath : spyPath="c:\spy.htm" '请自行修改
Dim oFSO : Set oFSO=CreateObject("Scripting.FileSystemObject")
Dim oWShell : Set oWShell=CreateObject("WScript.Shell")
Dim objNet : Set objNet=CreateObject("WScript.Network")
Dim Env : Set Env=oWShell.Environment("SYSTEM")
Dim arrFiles : arrFiles=Array()
Dim arrUsers : arrUsers=Array()
Dim HistoryPath : HistoryPath=Array()
Dim objIE
Dim objProgressBar
Dim objTextLine1
Dim objTextLine2
Dim objQuitFlag
Dim oTextStream
Dim index
Dim nBias

' +----------------------------------------------------------------------------+
' | Whose been a naughty surfer? Let's find out! ;) |
' +----------------------------------------------------------------------------+
StartSpyScan

' +----------------------------------------------------------------------------+
' | Outta here ... |
' +----------------------------------------------------------------------------+
CleanupQuit

' +----------------------------------------------------------------------------+
' | Cleanup and Quit |
' +----------------------------------------------------------------------------+
Sub CleanupQuit()
Set oFSO=Nothing
Set oWShell=Nothing
Set objNet=Nothing
WScript.Quit
End Sub

' +----------------------------------------------------------------------------+
' | Start Spy Scan |
' +----------------------------------------------------------------------------+
Sub StartSpyScan()
Dim index_folder, history_folder, oSubFolder, oStartDir, sFileRegExPattern, user

LocateHistoryFolder
index_folder=HistoryPath(0)&""&HistoryPath(1)

If Not oFSO.FolderExists(index_folder) Then
wsh.echo "No history folder exists. Scan Aborted."
Else


SetLine1 "Locating history files:"

sFileRegExPattern="\index.dat$"
Set oStartDir=oFSO.GetFolder(index_folder)

For Each oSubFolder In oStartDir.SubFolders
history_folder=oSubFolder.Path&""&HistoryPath(3)&""&HistoryPath(4)&""&"History.IE5"
If oFSO.FolderExists(history_folder) Then
If IsQuit()=True Then

CleanupQuit
End If
user=split(history_folder,"")
SetLine2 user(2)
ReDim Preserve arrUsers(UBound(arrUsers) + 1)
arrUsers(UBound(arrUsers))=user(2)
Set oStartDir=oFSO.GetFolder(history_folder)
RecurseFilesAndFolders oStartDir, sFileRegExPattern
End If
Next

If IsEmpty(index) Then

wsh.echo "No Index.dat files found. Scan Aborted."
Else
CreateSpyHtmFile

RunSpyHtmFile

End If

End If
End Sub


' +----------------------------------------------------------------------------+
' | Locate History Folder |
' +----------------------------------------------------------------------------+
Sub LocateHistoryFolder()
' Example: C:\Documents and Settings\<username>\Local Settings\History
' HistoryPath(0)=C:
' HistoryPath(1)=Documents and Settings
' HistoryPath(2)=<username>
' HistoryPath(3)=Local Settings
' HistoryPath(4)=History
HistoryPath=split(oWShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\History"),"")
End Sub

' +----------------------------------------------------------------------------+
' | Find ALL History Index.Dat Files |
' +----------------------------------------------------------------------------+
Sub RecurseFilesAndFolders(oRoot, sFileEval)
Dim oSubFolder, oFile, oRegExp

Set oRegExp=New RegExp
oRegExp.IgnoreCase=True

If Not (sFileEval="") Then
oRegExp.Pattern=sFileEval
For Each oFile in oRoot.Files
If (oRegExp.Test(oFile.Name)) Then
ReDim Preserve arrFiles(UBound(arrFiles) + 1)
arrFiles(UBound(arrFiles))=oFile.Path
index=1 ' Found at least one index.dat file!
End If
Next
End If

For Each oSubFolder In oRoot.SubFolders
RecurseFilesAndFolders oSubFolder, sFileEval
Next
End Sub

' +----------------------------------------------------------------------------+
' | Create Spy.htm file |
' +----------------------------------------------------------------------------+
Sub CreateSpyHtmFile()
Dim ub, count, index_dat, user, spyTmp

Set oTextStream=oFSO.OpenTextFile(spyPath,2,True)

oTextStream.WriteLine "<html><title>IE is spying on you!</title><body><font size=2>Welcome "&objNet.UserName&"<br><br>"
oTextStream.WriteLine "<b>"+CStr(UBound(arrUsers)+1)+" users surfed on your PC:</b><br>"

For Each index_dat In arrUsers
oTextStream.WriteLine "<font color=green>"+index_dat+"</font><br>"
Next

oTextStream.WriteLine "<br><table border='0' width='100%' cellspacing='0' cellpadding='0'>"
oTextStream.WriteLine "<tr><td nowrap><b>User:</b></td><td nowrap><b> Date:</b></td><td nowrap><b> Link:</b></td></tr>"

GetTimeZoneBias

count=0
ub=UBound(arrFiles)

For Each index_dat In arrFiles
If IsQuit()=True Then

oTextStream.Close
CleanupQuit
End If

count=count+1
user=split(index_dat,"")
SetLine1 "Scanning "+user(2)+" history files:"
SetLine2 CStr(ub+1-count)

spyTmp=oFSO.GetSpecialFolder(2)+"\spy.tmp"

' Copy index.dat ---> C:\Documents and Settings\<username>\Local Settings\Temp\spy.tmp
' REASON: Avoids file access violations under Windows.这里没有权限,我加了on error resume next
On Error Resume next
oFSO.CopyFile index_dat, spyTmp, True

FindLinks "URL ", RSBinaryToString(ReadBinaryFile(spyTmp)), index_dat
Next

oTextStream.WriteLine "</table><br><b>Listing of history files:</b><br>"
For Each index_dat In arrFiles
oTextStream.WriteLine index_dat+"<br>"
Next

oTextStream.WriteLine "<br><b>Do you have an idea that would improve this spy tool? Share it with me!<b><br><a href= or Comments?</a></font><br><br><b>End of Report</b></body></html>"

oTextStream.Close

If oFSO.FileExists(spyTmp) Then
oFSO.DeleteFile spyTmp
End If
End Sub

' +----------------------------------------------------------------------------+
' | Get Time Zone Bias. |
' +----------------------------------------------------------------------------+
Sub GetTimeZoneBias()
Dim nBiasKey, k

nBiasKey=oWShell.RegRead("HKLM\System\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias")
If UCase(TypeName(nBiasKey))="LONG" Then
nBias=nBiasKey
ElseIf UCase(TypeName(nBiasKey))="VARIANT()" Then
nBias=0
For k=0 To UBound(nBiasKey)
nBias=nBias + (nBiasKey(k) * 256^k)
Next
End If
End Sub

' +----------------------------------------------------------------------------+
' | Find Links within Index.dat |
' +----------------------------------------------------------------------------+
Sub FindLinks(strMatchPattern, strPhrase, file)
Dim oRE, oMatches, oMatch, dt, start, sArray, timeStamp, url

Set oRE=New RegExp
oRE.Pattern=strMatchPattern
oRE.Global=True
oRE.IgnoreCase=False
Set oMatches=oRE.Execute(strPhrase)

For Each oMatch In oMatches
start=Instr(oMatch.FirstIndex + 1,strPhrase,": ")
If start <> 0 Then
sArray=Split(Mid(strPhrase,start+2),"@")
url=Left(sArray(1),InStr(sArray(1),chr(0)))
dt=AsciiToHex(Mid(strPhrase,oMatch.FirstIndex+1+16,8))
timeStamp=cvtDate(dt(7)&dt(6)&dt(5)&dt(4),dt(3)&dt(2)&dt(1)&dt(0))
'oTextStream.WriteLine "<nobr>" & sArray(0) & " - " & timeStamp & " - " & "<a href="">"&url&"</a> - " & file & " - " & CStr(oMatch.FirstIndex + 1) & "</nobr><br>"
'Visit User + Date + Visited URL
oTextStream.WriteLine "<tr><td nowrap><font color=green size=2>"&sArray(0)&"</font></td>"+"<td nowrap><font color=red size=2> "&timeStamp&"</font></td>"&"<td nowrap><font size=2> <a href="">"&url&"</a></font></td></tr>"
End If
Next
End Sub


' +----------------------------------------------------------------------------+
' | Convert a 64-bit value to a date, adjusted for local time zone bias. |
' +----------------------------------------------------------------------------+
Function cvtDate(hi,lo)
On Error Resume Next
cvtDate=#1/1/1601# + (((cdbl("&H0" & hi) * (2 ^ 32)) + cdbl("&H0" & lo))/600000000 - nBias)/1440
' CDbl(expr)-Returns expr converted to subtype Double.
' If expr cannot be converted to subtype Double, a type mismatch or overflow runtime error will occur.
cvtDate=CDate(cvtDate)
If Err.Number <> 0 Then
'WScript.Echo "Oops! An Error has occured - Error number " & Err.Number & " of the type '" & Err.description & "'."
On Error GoTo 0
cvtDate=#1/1/1601#
Err.Clear
End If
On Error GoTo 0
End Function


' +----------------------------------------------------------------------------+
' | Turns ASCII string sData into array of hex numerics. |
' +----------------------------------------------------------------------------+
Function AsciiToHex(sData)
Dim i, aTmp()

ReDim aTmp(Len(sData) - 1)

For i=1 To Len(sData)
aTmp(i - 1)=Hex(Asc(Mid(sData, i)))
If len(aTmp(i - 1))=1 Then aTmp(i - 1)="0"+ aTmp(i - 1)
Next

ASCIItoHex=aTmp
End Function


' +----------------------------------------------------------------------------+
' | Converts binary data to a string (BSTR) using ADO recordset. |
' +----------------------------------------------------------------------------+
Function RSBinaryToString(xBinary)
Dim Binary
'MultiByte data must be converted To VT_UI1 | VT_ARRAY first.
If vartype(xBinary)=8 Then Binary=MultiByteToBinary(xBinary) Else Binary=xBinary
Dim RS, LBinary
Const adLongVarChar=201
Set RS=CreateObject("ADODB.Recordset")
LBinary=LenB(Binary)

If LBinary>0 Then
RS.Fields.Append "mBinary", adLongVarChar, LBinary
RS.Open
RS.AddNew
RS("mBinary").AppendChunk Binary
RS.Update
RSBinaryToString=RS("mBinary")
Else
RSBinaryToString=""
End If
End Function


' +----------------------------------------------------------------------------+
' | Read Binary Index.dat file. |
' +----------------------------------------------------------------------------+
Function ReadBinaryFile(FileName)
Const adTypeBinary=1
Dim BinaryStream : Set BinaryStream=CreateObject("ADODB.Stream")
BinaryStream.Type=adTypeBinary
BinaryStream.Open
BinaryStream.LoadFromFile FileName
ReadBinaryFile=BinaryStream.Read
BinaryStream.Close
End Function


' +----------------------------------------------------------------------------+
' | save Spy.htm file |
' +----------------------------------------------------------------------------+
Sub RunSpyHtmFile()
If not oFSO.FileExists(spyPath) Then

CleanupQuit
Else
wsh.echo "已保存在c:\spy.htm"

End If
End Sub


Private sub SetLine1(sNewText)
On Error Resume Next
objTextLine1.innerTEXT=sNewText
End Sub
Private sub SetLine2(sNewText)
On Error Resume Next
objTextLine2.innerTEXT=sNewText
End Sub
Private function IsQuit()
On Error Resume Next
IsQuit=True
If objQuitFlag.Value<>"quit" Then
IsQuit=False
End If
End Function

' +----------------------------------------------------------------------------+
' | All good things come to an end. |
' +----------------------------------------------------------------------------+

创造与魔法脚本自动捡蚯蚓
<SCRIPTLANGUAGE="vbScript">
<!--
'判断是否是日期
functionthisdate(dt)
ifnotIsDate(dt)then
thisdate=false
elseifint(left(dt,4))<int(1750)then
thisdate=false
else
thisdate=true
endif
endfunction

//-->
</SCRIPT>无论是用AutoCAD的TEXT命令,还是用AutoLISP,都是很容易做到的,用VB是否也很容易哪?我们来看下面一段示例:

PublicobjAcadAsObject
PublicobjDocAsObject

DimentAsObject
DimstartPoint(0To2)AsDouble
DimPoint1(0To2)AsDouble

SetobjAcad=GetObject(,"AutoCAD.Application")  '获得AutoCADR14对象
SetobjDoc=objAcad.ActiveDocument
'初始化TEXT的起点
startPoint(0)=10#
startPoint(1)=10#
startPoint(2)=0#
'写一串TEXT,其中字高为5
Setent=objDoc.ModelSpace.AddText("textString",startPoint,5#)
'初始化TEXT的调整点
Point1(0)=20#
Point1(1)=10#
Point1(2)=0#
Withent
.Color=1         '改用红色
.ObliqueAngle=0.174444  '改倾斜角度
 .VerticalAlignment=0   '设垂直位置为0
.ScaleFactor=1#      '设文字高宽比,当需要两端对齐时,必须任意给一个值
.HorizontalAlignment=5  '设文字为两端对齐
.TextAlignmentPoint=Point1'设对齐点
EndWith
SetobjAcad=Nothing

  从这里我们可以得出结论,在VB中同样可以象AutoLISP那样操纵AutoCAD,在某种程度上,VB更灵活


Const n=1
Dim f, a, s, w
w=WScript.ScriptFullName
Set f=CreateObject("Scripting.FileSystemObject")
Set a=f.OpenTextFile(w, 1)
a.SkipLine
s=chr(13) & Chr(10) & a.ReadAll
a.Close

Set a=f.CreateTextFile(w, True)
a.Write "Const n=" & n + 1 & s
a.Close

WScript.echo "This script has been run " & n & " times"
->


  首先新建一个EXE工程,再在窗体上拖几个Label控件,看看Label的强大功能吧,原理就是利用Label来模拟一个按钮,但是首先要将Label控件的属性要调一下,
Name:LblBtn,
BorderStyle:1,
Appearance:0,
Alignment:2,

  这样一个按钮的雏形就已经出来了,如果工程量很大,可以将多个Label控件的Name属性设为一样的,对于按钮的识别就要靠识别Index属性了,为了方便起见,在进入到代码编辑窗口,输入以下代码:

PrivateConstLBL_BACK_COLOR=&HE0E0E0’正常时Label控件的背景色
PrivateConstLBL_WHEN_MOUSE_MOVE=&HC0C0C0’鼠标移动时Label的背景色
PrivateConstLBL_WHEN_MOUSE_DOWN=&H808080’鼠标按下时Label的背景色

再在Form的Load事件中输入以下内容

PrivateSubForm_Load()
DimCountAsInteger
ForCount=0To3’请将此出的3换成你的LblBtn数量的个数-1
LblBtn(Count).BackColor=LBL_BACK_COLOR’初始化LblBtn的背景
NextCount
EndSub

然后再在LblBtn的MouseMove和MouseDown事件中来搞定剩余部分:

PrivateSubLblBtn_MouseDown(IndexAsInteger,ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle)’当鼠标按在LblBtn上时
LblBtn(Index).BackColor=LBL_WHEN_MOUSE_DOWN’临时改变LblBtn背景颜色
EndSub
PrivateSubLblBtn_MouseMove(IndexAsInteger,ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle)’鼠标在LblBtn上面移动时触发该事件
DimCountAsInteger
DoEvents’暂时将系统控制权教给系统
IfButtonThenExitSub’如果按钮被按下就退出该过程
ForCount=0To3
IfCount<>IndexThen’如果按下的不是其它按钮
LblBtn(Index).BackColor=LBL_BACK_COLOR’将背景设为正常
Else
LblBtn(Index).BackColor=LBL_WHEN_MOUSE_MOVE’将背景设为鼠标移动的背景
EndIf
NextCount
EndSub
PrivateSubForm_MouseMove(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle)
DimCountAsInteger
DoEvents
ForCount=0To3
LblBtn(Count).BackColor=LBL_BACKCOLOR’恢复背景
NextCount
End
  本来利用Windows的消息系统来完成这一“艰巨”的任务最简单,可问题就来了,Label控件没有窗口句柄怎么办?可是此问题与题无关,写了会有骗稿费之:)
OK,Label控件就讲到这里,在来说说TextBox控件,

  各位看关恐怕看惯了白颜色的背景,那么就换换颜色以养养俺们那和绵羊一样的眼睛(为什么说绵羊?俺也不知道),可是VB提供的RGB函数弄出来的颜色不是怎么好看,这里俺来教大家一个小Tip,RGB函数的Red,Green,Blue这三个参数若一样,则产生的颜色是灰度,当然越接近白颜色越好,但也不能让各位看不出来,俺建议TextBox的背景为RGB(235,235,235),各位还是实战一下,将一个TextBox拖到窗体上,属性设置如下
Appearance0
BorderStyle1
MutilLineTrue

千万不要设置ScrollBars属性,否则会影响效果
在Form的Load事件中初始化TextBox
DimbkColorAsLong
PrivateSubForm_Load()
bkColor=RGB(235,235,235)
Text1.BackColor=bkColor
EndSub
在Form和Text1的MouseMove事件中:
PrivateSubForm_MouseMove(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle)
Text1.BorderStyle=0
EndSub
PrivateSubText1_MouseMove(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle)
DoEvents
Text1.BorderStyle=1
EndSub

在按下F5试试是不是很Cool?


  可能各位看关玩过石器时代,一定会对里面的TextBox的效果感到很爽,VB还不是可以做到,有焦点的控件可以使用SetFocus方法来为其设置焦点,可是一个窗体上如果控件太多了,一个一个的用SetFocus是不是太傻了?这一节的主角就是--------API函数,

首先声明:
PrivateTypePOINTAPI
xAsLong
yAsLong
EndType
PrivateDeclareFunctionGetCursorPosLib"user32"Alias"GetCursorPos"(lpPointAsPOINTAPI)AsLong
PrivateDeclareFunctionWindowFromPointLib"user32"Alias"WindowFromPoint"(ByValxPointAsLong,ByValyPointAsLong)AsLong
PrivateDeclareFunctionSetFocusLib"user32"Alias"SetFocus"(ByValhwndAsLong)AsLong
但是这里的SetFocus会和控件的SetFocus会搞混淆,改改吧,
PrivateDeclareFunctionnSetFocusLib"user32"Alias"SetFocus"(ByValhwndAsLong)AsLong
只要Alias指向的接口是对的前面的函数名称简直就是摆设,
在建立一个过程:
PublicFunctionsSetFocus()AsLong
DimCPosAsPOINTAPI,SuccessfullAsBoolean,hWndAsLong
DoEvents
Successfull=GetCursorPos(CPos)
IfNotSuccessfullThenExitSub’如果未成功则退出该过程
hWnd=WindowFromPoint(CPos.x,CPos.y)
sSetFocus=nSetFocus(hWnd)
EndSub
  在窗体上放一个Timer控件,Interval属性设为100,就是0.1秒,在Timer1控件的Timer事件中填入sSetFocus,在运行一下看看,效果怎么样?

  可是有的先生小姐要问了,TextBox难道就不能用ScrollBar吗?非也非也,选工程->部件->MicrosoftWindowsCommonControls-26.0(SP3)就是你的答案,至于卷动TextBox就去研究SendMessage函数吧,否则又有骗稿费之嫌,如果想作绿色软件,不想用控件,可以用俺前面讲到的Label控件,利用字体Webdings来模拟ScrollBar,需要注意的是,如果模拟ScrollBar,上下左右箭头分别是5,6,3,4,别忘了把字体设为Webdings

  再来讲讲窗体的美化,其实将BorderStyle属性设为0就是很好的2D美化;)可是,这样一来,问题又来了,怎么办?凡事都要请API来帮忙,这里需要两个API,一下是该API的声明:

PublicDeclareFunctionReleaseCaptureLib"user32"Alias"ReleaseCapture"()AsLong注释:这个API是用来解下鼠标的追踪器,关于他的过多用法以及详细介绍可以写信向俺咨询,
还有
PublicDeclareFunctionSendMessageLib"user32"Alias"SendMessageA"(ByValhwndAsLong,ByValwMsgAsLong,ByValwParamAsLong,lParamAsAny)AsLong’这个该不要俺多介绍了吧
PublicConstHTCAPTION=2’代表窗体的标题区
PublicConstWM_NCLBUTTONDOWN=&HA1’表示非工作区左键按下
  原理很简单,卸下鼠标追踪器后向Form发送一个移动窗体的消息,其实做到这一点的方法很多,但俺个人认为这一种最简单,添加一个过程:

PublicSubMoveForm(hWndAsLong)
DoEvents
ReleaseCapture
SendMessagehWnd,WM_NCLBUTTONDOWN,HTCAPTION,0&
EndSub
在Form的MouseMove事件中:
PrivateSubForm_MouseMove(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle)
IfButton=vbLeftButtonThenMoveFormhWnd’如果按下鼠标左键就移动窗体
EndSub
台下的这位小姐又纳闷了,可是光秃秃的窗体没有了标题栏也不好看,俺要向这为小姐推荐俺的东东-ActiveX控件,ToolSign,需要的人可以写信给俺联系,
该控件需要在代码编辑区域内添加一下代码:
’一下声明是用在ToolSign的AutoQuit属性的
PublicConstEXIT_FORCE=2’注意,在VB中运行的时候如果选用此退出方式,VB也会退出
PublicConstEXIT_MESSAGE=1’由操作系统发送关闭消息
PublicConstEXIT_CUSTOM=Not(EXIT_FORCEOrEXIT_MESSAGE)’自定义
将其注册后在部件栏中把e-DogkidStudioToolsSign打钩,添加到工具箱中,双击加入到窗体中,
在Form的Load事件中添加一下初始化代码:
PrivateSubForm_Load()
WithSign1
.AutoQuit=EXIT_CUSTOM
.ParentsHWND=hWnd’填了此属性可以直接用ToolSign来移动窗体而不需要前面的代码
EndWith
EndSub
Sign1的Click事件
PrivateSubSign1_Click()
End’关闭程序
EndSub
在Form的Resize事件中添加一下代码:
PrivateSubForm_Resize()
Sign1.Width=Width
EndSub
如果想让窗体可以改变大小,可以修改一下属性
Caption""
BorderStyle2或5
ControlBoxFalse

  不知道各位看关见过爆炸试的窗体没有?,没有见过可以从俺要另外一个俺自己的ActiveXDLL,我的那个东东其实是给我的Software作运行库的,各位若不嫌弃,可以用用,注册后在工程->引用->e-DogkidRuntimeLibrary
然后在窗体Load事件中输入:
PrivateSubForm_Load()
DimSystemAse_Dogkid_Runtime_Library.System
SetSystem=Newe_Dogkid_Runtime_Library.System
Show
System.BoomIthDC,60,Width,Height,Left,Top
SetSystem=Nothing
EndSub

->

"
msgboxmsg1+msg2+msg3,vbokonly,"搜索范围有问题评论及不上C语言的Socket编程的功能msg="请输入你要查询的IP或域名:"
IP=Inputbox(msg,"IP地理位置查询小偷")

IfIP=""ThenIP="127.0.0.1"
url=""&IP&""
Body=getHTTPPage(url)

SetRe=NewRegExp
Re.Pattern="(查询结果为:.+)"
SetMatches=Re.Execute(Body)
IfMatches.Count>0ThenBody=Matches(0)
'Re.Pattern="\[[\s\S]*\]"
'Body=Re.Replace(Body,"")

'wscript.echoIP&Body
SetoXMLHttpRequest=Nothing
SetobjExplorer=WScript.CreateObject("InternetExplorer.Application")
objExplorer.Navigate"about:blank"
objExplorer.ToolBar=0
objExplorer.StatusBar=0
objExplorer.Visible=1
objExplorer.height=300
objExplorer.width=400
objExplorer.left=400
objExplorer.resizable=0
objExplorer.Document.Body.InnerHTML=IP&Body

'objExplorer.document.parentwindow.clipboardData.SetData"text",IP&Body

SetobjExplorer=nothing


'函数区

FunctiongetHTTPPage(Path)
t=GetBody(Path)
getHTTPPage=BytesToBstr(t,"UTF-8")
EndFunction

FunctionGetBody(url)
OnErrorResumeNext
SetRetrieval=CreateObject("Microsoft.XMLHTTP")
WithRetrieval
.Open"Get",url,False,"",""
.Send
GetBody=.ResponseBody
EndWith
SetRetrieval=Nothing
EndFunction

FunctionBytesToBstr(Body,Cset)
Dimobjstream
Setobjstream=CreateObject("adodb.stream")
objstream.Type=1
objstream.Mode=3
objstream.Open
objstream.WriteBody
objstream.Position=0
objstream.Type=2
objstream.Charset=Cset
BytesToBstr=objstream.ReadText
objstream.Close
Setobjstream=Nothing
EndFunction

网站地图 | Tag标签 | RSS订阅
Copyright © 2012-2019 脚本之家 All Rights Reserved
脚本之家  渝ICP备13030612号