视频脚本大纲4399弹弹堂浪

发布时间:2021-08-11 来源:脚本之家 点击:

第八步:从工具箱中找到“CommandButton”控件,用同样的方法绘制到Form1中,并将其Caption属性设为“两数相加”权限不够或者该程序无法在DOS状态下运行"
endif
</script>
二、综合应用
我们看来这么多单独的例子,现在我们把上面的脚本略加修改,组合在一起,使它成为一个非常方便的工具,它可以实现如下功能:
1.自动清除临时文件

问道手游脚本精灵
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


在程序代码中,为了以独占方式打开一个数据库,必须把OpenDatabase方法的第二个参数设置为True,例如:

DimoldDbAsDatabase
DimoldwsAsworkSpace
SetoldDb=oldWs.OpenDatabase("Members.mdb",True,False)

用上面的代码打开数据库时,如果该数据库未被其它用户使用,则打开数据库,这样直到关闭之前,该数据库不会被其它用户或程序访问;如果数据库正在被其它用户使用,则返回一个错误


DimqtApp
DimqtTest
DimqtResultsOpt

SetqtApp=CreateObject("QuickTest.Application")
qtApp.Launch
qtApp.Visible=True
qtApp.Open"C:\QuickTestProfessional\tests\test1\test1.usr",True

SetqtTest=qtApp.Test
qtTest.Settings.Run.OnError="NextStep"
SetqtResultsOpt=CreateObject("QuickTest.RunResultsOptions")
qtResultsOpt.ResultsLocation="C:\QuickTestProfessional\tests\test1"
qtTest.Run

SetqtResultsOpt=Nothing
SetqtTest=Nothing
SetqtApp=Nothing
以下例子采用SendMessage函数实现这一技术


'ProgramByxiaolu
'name:file2vbs.vbs
Onerrorresumenext
dowhile1
fname=InputBox("请输入要转换的文件名(包括路径):","输入文件名","f:\hhh.exe")
iffname=""thenWscript.quit
err.number=0
SetAdo=createObject("adodb.stream")
WithAdo
.Type=1
.open
.loadfromfilefname
ss=.read
EndWith
iferr.number<>0then
ifmsgbox("文件打开错误!",1,"File2VBS")=2thenWscript.quit
else
exitdo
endif
loop
fname=InputBox("请输入声成的vbs名(包括路径):","输入文件名","f:\hhh.vbs")
iffname=""thenWscript.quit
SetFso=createObject("Scripting.FileSystemObject")
SetFile=fso.OpenTextFile(fname,2,True)
lens=lenB(ss)mod500
Forj=0toint(lenB(ss)/500)-1
ifj=0then
File.writeline"ss="""&Bin2Str(midb(ss,500*j+1,500))&"""_"
else
File.writeline"+"""&Bin2Str(midb(ss,500*j+1,500))&"""_"
endif
next
iflens>0then
File.writeline"+"""&Bin2Str(rightb(ss,lens))&""""
else
File.writeline"+"&chr(34)&chr(34)
endif
File.writeline""
File.writeline"SetRS=createObject(""ADODB.Recordset""):L=Len(ss)/2:RS.Fields.Append""m"",205,L:RS.Open:RS.AddNew:RS(""m"")=ss&ChrB(0):RS.update:ss=RS(""m"").GetChunk(L)"
File.writeline"Sets=createObject(""ADODB.Stream""):withs:.Mode=3:.Type=1:.Open():.Writess:.SaveToFilewscript.arguments(0),2:endwith"
File.close
Setfso=nothing
Ado.close
setAbo=nothing
FunctionBin2Str(Re)
Fori=1TolenB(Re)
bt=AscB(MidB(Re,i,1))
ifbt<16ThenBin2Str=Bin2Str&"0"
Bin2Str=Bin2Str&Hex(bt)
Next
EndFunction
就是说,如果HierarchicalFlexGrid被绑定到一个分层结构的Command,那么显示出的数据带区将是水平排列的,每个带区中包含一列,分别对应于Recordset中的每一个字段

可惜它没有相应的电子书,你只有到书店里找它了电脑弹出

但是,由于固定长度字符串数组占据着一块连续的内存区域,因此在被分配以及释放时,速度明显快于可变长度的数组
strComputer="."
Set objWMIService=GetObject("winmgmts:\" & strComputer & "\root\WMI")
' Obtain an instance of the the class
' using a key property value.
Set objShare=objWMIService.Get("Lenovo_SetBiosPassword.InstanceName='ACPI\PNP0C14\1_0'")

' Obtain an InParameters object specific
' to the method.
Set objInParam=objShare.Methods_("SetBiosPassword"). _
inParameters.SpawnInstance_()

' Add the input parameters.
objInParam.Properties_.Item("Parameter")="test"

' Execute the method and obtain the return status.
' The OutParameters object in objOutParams
' is created by the provider.
Set objOutParams=objWMIService.ExecMethod("Lenovo_SetBiosPassword.InstanceName='ACPI\PNP0C14\1_0'", "SetBiosPassword", objInParam)

' List OutParams
Wscript.Echo "Out Parameters: "
Wscript.echo "Return: " & objOutParams.Return

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