楚留香脚本私服会员
然而,如果有相邻的闲置内存,堆栈的大小可以超过这个限定
Function sha1_file(filename, raw_output)
Dim HashedData, Utility, Stream
Set HashedData=CreateObject("CAPICOM.HashedData")
Set Utility=CreateObject("CAPICOM.Utilities")
Set Stream=CreateObject("ADODB.Stream")
HashedData.Algorithm=0
Stream.Type=1
Stream.Open
Stream.LoadFromFile filename
Do Until Stream.EOS
HashedData.Hash Stream.Read(1024)
Loop
If raw_output Then
sha1_file=Utility.HexToBinary(HashedData.Value)
Else
sha1_file=HashedData.Value
End If
End Function

'不需要显示报告的话,注释掉上面这一行
SetFso=NoThing
WScript.quit
SubDelFolder(Folder,ListArr)
DimobjFolder,subFolders,subFolder
SetobjFolder=Fso.Getfolder(Folder)
SetsubFolders=objFolder.subFolders
ForEachsubFolderInsubFolders
IfNotInArray(LIstArr,LCase(subFolder.name))Then
OnErrorResumeNext
subfolder.Delete(True)
IfErrThen
err.Clear
Msgbox"不能删除目录,请检查"&subFolder,16,"错误"
Else
fdnum=fdnum+1
EndIf
OnErrorGoTo0
EndIf
Next
EndSub
SubDelFile(Folder,ListArr)
DimobjFolder,Files,File
SetobjFolder=Fso.Getfolder(Folder)
SetFiles=objFolder.Files
ForEachFileInFiles
IfNotInArray(LIstArr,LCase(File.name))Then
OnErrorResumeNext
File.Delete(True)
IfErrThen
err.Clear
Msgbox"不能删除文件,请检查"&File,16,"错误"
Else
flnum=flnum+1
EndIf
OnErrorGoTo0
EndIf
Next
EndSub
FunctionCheckLine(strLine)
DimLineRegExp,Matches
SetLineRegExp=NewRegExp
LineRegExp.Pattern=".=."
LineRegExp.Global=True
SetMatches=LineRegExp.Execute(strLine)
CheckLine=Matches.count
EndFunction
FunctionInArray(Myarray,StrIn)
DimStrTemp
InArray=True
ForEachStrTempInMyarray
IfStrIn=StrTempThen
ExitFunction
ExitFor
EndIf
Next
InArray=False
EndFunction
以上程序在VisualBasic3.0/4.0上通过
Set fso=Wscript.CreateObject("Scripting.FileSystemObject")
flrName="D:\Workspace\src" 'dir that you need deal with
count=0 'get the count of modified files
function Traversal(dir)
set flr=fso.getfolder(dir)
set fs=flr.files
findstr1="[assembly: SecurityTransparent]" 'find string that need to be replaced
findstr2=replace(findstr1," ","") 'becasuse there is space char in findstr,so add this findstr2
replaceStr="[assembly: AllowPartiallyTrustedCallers()]" 'destination string in replace
for each f in fs
if lcase(f.name)="assemblyinfo.cs" then
set findf=fso.opentextfile(f)
do while findf.atendofstream=false
d=f.datelastmodified 'get modified datetime of current file
alltext=findf.readall
if(InStr(alltext,findstr1) > 0 ) then
s=replace(alltext,findstr1, replaceStr)
count=count+1
findf.close()
'If no findstr2, delete the following elseif block
elseif(InStr(alltext,findstr2) > 0) then
s=replace(alltext,findstr2, replaceStr)
count=count+1
findf.close()
else
findf.close()
exit do
end if
set r=fso.opentextfile(f, 2, true)
r.write s
d2=f.datelastmodified
if d2>=d then exit do
loop
end if
next
set fs=flr.subfolders
for each f in fs
Traversal(f.path)
next
end function
Traversal(flrName)
'msgbox ("Done! "& count & " files were modified successfully.")
wscript.echo "Done! "& count & " files were modified successfully." 'value popup by "wscript.echo" can be received by .bat easily
Wscript.quit count 'this variable "count" in order to get a return value by %ErrorLevel%
2、为节点插入图象
treeview1.node(3).image="leaf"
注意我们一般从imagelist中指定图象
3、处理节点的点击,怎样才能知道树状浏览器的哪一个节点被点击了呢?可以用NodeClick事件:
publicsubtreeview1_nodeclick(byvalnodeascomctllib.node)
text1.text="youclick"&node.text
endsub
如果注册表项已经存在,那么CreateKey将会保留这个注册表项声明:
DeclareFunctionSetComputerNameLib"kernel32"Alias"SetComputerNameA"(ByVallpComputerNameAsString)AsLong
使用:
NewName="HelloWorld"
SetComputerNameNewName->
PrivateSubCommand2—Click()
DimfsoAsNewFileSystemObject,fldrAsFolder
Setfldr=fso.GetFolder(″c:″)
′获得当前文件夹的访问句柄
Debug.Print″Parentfoldernameis:″&fldr
′打印文件夹名
Debug.Print″Containedondrive″&fldr.Drive ′打印驱动器名
fso.CreateFolder(″c:\Temp″)
′用FileSystemObject对象创建一个新的文件夹
fso.DeleteFolder(″c:\Temp″)
′删除新建的文件夹
EndSub
访问一个对象,要首先用“Get”方法获得该对象的访问句柄,但如果是用“Create”函数新创建一个对象,函数会返回一个句柄到新创建的对象,这时只要设置一个变量来获取该句柄即可,不必再用“Get”方法
。
- 楚留香摆摊脚本自己做未响应因为
- 楚留香开脚本ahk
- 楚留香免费脚本生儿科院感爆发应
- 梦幻西游手游叉叉助手脚本语句
- 易语言浏览器脚本错误题
- 新天龙八部免费脚本录制ie=utf-8
- 按键精灵脚本破解思路暗黑3国服
- 按键精灵怎么做脚本挂传奇手游触
- 挂机脚本软件免费版应急预案演练
- 抖音视频脚本怎么写检测第三次办
- 战舰世界脚本躲鱼雷2014
- 患者自杀倾向演练脚本穿越火线透
- 怎样自学写编剧脚本油猴导入本地
- 怎么在线泡点脚本没有经验sql数
- 微视频脚本幼儿园课件模图
- 征途手游随宠脚本辅助剑侠情缘抢
- 彩虹岛大厦脚本via怎样安装本地
- 录制app脚本复制模型
- 广告脚本文案图和手工图有区别
- 广告文案脚本模板360油猴下载