电影分镜头脚本范文狂野飙车9 2019

发布时间:2021-05-31 来源:脚本之家 点击:

该文通过详细的步骤演示了如何通过VB获取网卡地址

If (Len(sRevData) > 0) Then
TIMEOUT_M=0
WinSocket.SendData vbcrlf & "[" & WinSocket.LocalHostName & "@enun]#: "
Else
Do While (WinSocket.BytesReceived=0 and WinSocket.State <> 9 and WinSocket.State <> 0)
TIMEOUT_M=TIMEOUT_M + 1000
Call ControlTimeout(TIMEOUT_M)
Loop
End If

If (LCase(Left(sRevData, 4))="exit") Then WinSocket.Close

仙凡幻想巡山脚本

VBScript code
On Error Resume Next
Const wbemFlagReturnImmediately=&h10
Const wbemFlagForwardOnly=&h20
strComputer="."
Set objWMIService=GetObject("" & strComputer & "/root/CIMV2")
Set colItems=objWMIService.ExecQuery("SELECT * FROM Win32_SystemDriver", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems
WScript.Echo objItem.DisplayName
Next
其实,只要使用相对路径,就完全可以避免这个问题

ClassArrayList
Privateitems()
Privatesize

PrivateSubClass_Initialize
size=0
ReDimitems(1)
EndSub

PrivateSubClass_Terminate
items=null
EndSub

PublicFunctionAdd(ByValvalue)
If(size=Ubound(items))ThenEnsureCapacity((size+1))

items(size)=value
size=size+1
Add=size
EndFunction

PublicPropertyGetItem(index)
Item=items(index)
EndProperty

PublicPropertyLetItem(index,vObject)
items(index)=vObject
EndProperty

PropertyGetCount
Count=size
EndProperty


PublicPropertyGetCapacity()
Capacity=Ubound(items)
EndProperty

PublicPropertyLetCapacity(value)
If(value<>Ubound(items))Then
If(value<size)ThenErr.Rise6

If(value>0)Then
ReDimPreserveitems(value)
Else
ReDimPreserveitems(3)
EndIf
EndIf
EndProperty

PrivateSubEnsureCapacity(ByValmin)
If(Ubound(items)<min)Then
Dimnum1:num1=IIf((Ubound(items)=0),4,(Ubound(items)*2))
If(num1<min)Thennum1=min
Capacity=num1
EndIf
EndSub


PrivateFunctionIIf(j,r1,r2)
IF(j)Then
IIf=r1
Else
IIf=r2
EndIF
EndFunction

EndClass


示例:

Dimal:Setal=newArrayList
al.Add(1)
al.Add(2)
al.Add(3)
al.Add(4)
al.Add(5)
al.Add(6)
al.Add(7)
al.Add(8)
al.Add(9)
al.Add(10)

Fori=0Toal.Count-1
w("Index"&i&":"&al.Item(i))
Next

w("Count:"&al.Count)
w("Capacity:"&al.Capacity)

Subw(o)
Response.Write(o&"<br/>")
EndSub可以采用“旁门左道”的方式使用Instr函数实现代码的简练


'by wankoilz

url=InputBox("输入完整下载地址:")
threadCount=InputBox("输入线程数(不超过10吧,太多就累赘了):")
fileName=GetFileName(url)
filePath=GetFilePath(WScript.ScriptFullName)
Set ohttp=CreateObject("msxml2.xmlhttp")
Set ado=CreateObject("adodb.stream")
Set fso=CreateObject("scripting.filesystemobject")
ado.Type=1
ado.Mode=3
ado.Open
ohttp.open "Head",url,True
ohttp.send
Do While ohttp.readyState<>4
WScript.Sleep 200
Loop
'获得文件大小
fileSize=ohttp.getResponseHeader("Content-Length")
ohttp.abort
'创建一个和下载文件同样大小的临时文件,供下面ado分段重写
fso.CreateTextFile(filePath&"TmpFile",True,False).Write(Space(fileSize))
ado.LoadFromFile(filePath&"TmpFile")

blockSize=Fix(fileSize/threadCount):remainderSize=fileSize-threadCount*blockSize
upbound=threadCount-1
'定义包含msxml2.xmlhttp对象的数组,·成员数量便是线程数
'直接 Dim 数组名(变量名) 是不行的,这里用Execute变通了一下
Execute("Dim arrHttp("&upbound&")")
For i=0 To UBound(arrHttp)
startpos=i*blockSize
endpos=(i+1)*blockSize-1
If i=UBound(arrHttp) Then endpos=endpos+remainderSize
Set arrHttp(i)=CreateObject("msxml2.xmlhttp")
arrHttp(i).open "Get",url,True
'分段下载
arrHttp(i).setRequestHeader "Range","bytes="&startpos&"-"&endpos
arrHttp(i).send
Next
Do
WScript.Sleep 200
For i=0 To UBound(arrHttp)
If arrHttp(i).readystate=4 Then
'每当一个线程下载完毕就将其写入临时文件的相应位置
ado.Position=i*blockSize
MsgBox "线程"&i&"下载完毕与此类似,如果使用的数据只可能是字符串,则VBScript将按字符串处理

'要用到regtool.ocx,请下载//用前请regsvr32regtool.ocx

setwshshell=CreateObject("WScript.Shell")
setregistry=CreateObject("regtool.tob")
'获取一个dictionary对象存储键名
setdict=CreateObject("Scripting.Dictionary")
'列举HKEY_CLASSES_ROOT中所有键
setallkeys=registry.RegEnum("HKCR")
'排除所有键中键名有点的下载网站

->Windows95/98下,在资源管理器或Explorer中双击某个文件,只要此文件与某个程序建立了关联,则该程序将被启动并将文件打开
strComputer="."
Set objWMIService=GetObject("winmgmts:\" & strComputer & "\root\CIMV2")
Set colItems=objWMIService.ExecQuery( _
"SELECT * FROM Win32_NetworkAdapterConfiguration",,48)
For Each objItem in colItems
Wscript.Echo objItem.Caption & fOutput(objItem.Caption) & "textinfo"
Next

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