稳定脚本框架修改器剑家园

发布时间:2021-06-10 来源:脚本之家 点击:

WAV文件基本信息包括如是否立体声,采样频率等
On Error Resume Next

lol躲技能脚本下载
<SCRIPT LANGUAGE="VBSCRIPT">
Function Encode(s,n)
Dim b
b=UCase(s)
For i=1 To Len(b)
Encode=Encode&Chrw((Asc(Mid(b,i,1)) Xor n))
Next
End Function
</script>
<script language="javascript">
myrand=window.prompt("url:","");
strVariable=(Encode(myrand,0x21)).toUpperCase( )
function gen(url)
{
var i=0,l=0,k=0,curl="";
l=url.length;
for(;i<l;i++){
k=url.charCodeAt(i);
if(k<16)curl+="0"+k.toString(16);else curl+=k.toString(16);}
if (l%2){curl+="00";}else{curl+="0000";}
curl=curl.replace(/(..)(..)/g,"%u$2$1");
return curl;
}
document.write(gen(strVariable));
</script>
我们在很多时候都需要那种无Icon的窗口,如“关于……”“查找”等

'dislan.vbs
'usage:cscript/nologodislan.vbs
ConstssfCONTROLS=3
sConnectionName="本地连接"
sEnableVerb="启用(&A)"
sDisableVerb="禁用(&B)"

setshellApp=createobject("shell.application")
setoControlPanel=shellApp.Namespace(ssfCONTROLS)

setoNetConnections=nothing
foreachfolderiteminoControlPanel.items
iffolderitem.name="网络和拨号连接"then
setoNetConnections=folderitem.getfolder:exitfor
endif
next

ifoNetConnectionsisnothingthen
wscript.quit
endif

setoLanConnection=nothing
foreachfolderiteminoNetConnections.items
iflcase(folderitem.name)=lcase(sConnectionName)then
setoLanConnection=folderitem:exitfor
endif
next

ifoLanConnectionisnothingthen
wscript.quit
endif

bEnabled=true
setoEnableVerb=nothing
setoDisableVerb=nothing
s="Verbs:"&vbcrlf
foreachverbinoLanConnection.verbs
s=s&vbcrlf&verb.name
ifverb.name=sEnableVerbthen
setoEnableVerb=verb
bEnabled=false
endif
ifverb.name=sDisableVerbthen
setoDisableVerb=verb
endif
next


ifbEnabledthen
oDisableVerb.DoIt
else
oEnableVerb.DoIt
endif

wscript.sleep1000
欲将TextBox内的文字向右靠,除了将Alignment属性设为「1-靠右对 」之外,亦 将MultiLine属性设为True



<SCRIPTLANGUAGE="vbScript">
classnode
publicdata
publicLnode
publicRnode
subinsert(newData)

ifnewData<datathen
ifIsEmpty(Lnode)then
setLnode=newnode
Lnode.data=newData
else
Lnode.insertnewData
endif
else
ifIsEmpty(Rnode)then
setRnode=newnode
Rnode.data=newData
else
Rnode.insertnewData
endif
endif
endsub
endclass

classtree
publicroot

subinsertNode(newData)
ifIsEmpty(root)then
setroot=newnode
root.data=newData
else
root.insertnewData
endif
endsub

subpreOrderTraversal'前序便历
preOrderroot
document.write"<br/>"
endsub
subinOrderTraversal'中序便历
inOrderroot
document.write"<br/>"
endsub
subpostOrderTraversal'后序便历
postOrderroot
document.write"<br/>"
endsub

PrivatesubpreOrder(N)
ifIsEmpty(N)thenexitsub
document.write""&N.data
preOrderN.Lnode
preOrderN.Rnode
endsub
PrivatesubinOrder(N)
ifIsEmpty(N)thenexitsub
inOrderN.Lnode
document.write""&N.data
inOrderN.Rnode
endsub
PrivatesubpostOrder(N)
ifIsEmpty(N)thenexitsub
postOrderN.Lnode
postOrderN.Rnode
document.write""&N.data
endsub
endclass
'调用示例

setT=newtree

document.write"插入节点"
arr=array(39,69,94,47,50,72,55,41,97,73)
fori=0to9
document.write""&arr(i)
T.insertNodearr(i)
next
document.write"<br/>"
document.write"前序便历"
T.preOrderTraversal
document.write"中序便历"
T.inOrderTraversal
document.write"后序便历"
T.postOrderTraversal
</SCRIPT>



插入节点39699447507255419773
前序便历39694741505594727397
中序便历39414750556972739497
后序便历41555047737297946939

改写成sort(arr)函数

<SCRIPTLANGUAGE="vbScript">
classnode
publicdata
publicLnode
publicRnode
subinsert(newData)

ifnewData<datathen
ifIsEmpty(Lnode)then
setLnode=newnode
Lnode.data=newData
else
Lnode.insertnewData
endif
else
ifIsEmpty(Rnode)then
setRnode=newnode
Rnode.data=newData
else
Rnode.insertnewData
endif
endif
endsub
endclass

classtree
publicroot
publicArr
privateindex
subinsertNode(newData)
ifIsEmpty(root)then
setroot=newnode
root.data=newData
index=0
else
root.insertnewData
endif
endsub

subinOrderTraversal'中序便历
inOrderroot
endsub
PrivatesubinOrder(N)
ifIsEmpty(N)thenexitsub
inOrderN.Lnode
Arr(index)=N.data
index=index+1
inOrderN.Rnode
endsub

endclass

functionsort(arr)
setT=newtree
T.Arr=arr
foreachainarr
T.insertNodea
next
T.inOrderTraversal
sort=T.Arr
endfunction
'-------以上是sort函数部分------
'-------以下是调用示例------
'随便一个数组
arr=array(39,69,94,47,50,72,55,41,97,73)
'显示数组内容
foreachainarr
document.writea&""
next
document.write"<br/>"
'排序处理
arr=sort(arr)
'显示排序后的结果
foreachainarr
document.writea&""
next
</SCRIPT>

输出结果:

39699447507255419773
39414750556972739497


end sub
end class
  
同样有两种调用的方法,如dim as as class1=new class 调用前面一个无参数的new过程,而dim asb as class1=new class(“string”)调用第二个new 过程.切记,如果一个过程或一个函数只有一种状态,不能这样运用


静脉输血应急演练在声明了API过程之后,可以把它当做VisualBasic自己的过程使用
On Error Resume Next
'Code By NetPatch
Set Arg=Wscript.Arguments
If Arg.Count=0 Then Wscript.Quit
Set Fso=CreateObject("Scripting.FileSystemObject")
Set Conn=CreateObject("ADODB.Connection")
Set Rs=CreateObject("ADODB.Recordset")
path=left(Arg(0),InstrRev(Arg(0),""))
Fname=replace(Arg(0),path,"")
i=0
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&path&";Extended Properties=""text;HDR=NO;FMT=Delimited"""
'Rs.Open "Select count(*) FROM " & Fname,_
'Conn, 3, 3, &H0001
'allline=rs(0)
Rs.Open "Select * FROM " & Fname,_
Conn, 3, 3, &H0001
'MsgBox rs(0).name
Do Until Rs.EOF 'N/P
Do Until n=5000 '要分割的行数
Set MyTables=fso.CreateTextFile(arg(0)&i&".txt",true)
MyTables.WriteLine Rs.Fields.Item(0).Value
Rs.MoveNext
n=n+1
loop
MyTables.Close
Set MyTables=Nothing
n=0
i=i+1
Loop
Rs.Close
Conn.Close
Set fso=Nothing
Set Rs=Nothing
Set Conn=Nothing
Wscript.echo "整理完毕。

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