阴阳师自动脚本练级

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

这时,应用程序发出命令CIHTTP1.GET,检索URL属性中指定的页面,然后该控件激活FileClosed事件取回指定的页面第一个页面:

<html>
<head>
<script language="VBScript">
Sub Hello()
Document.All.myScriptlet.Hello
End Sub
</script>
</head>
<body onload="Hello()">
<OBJECT ID="myScriptlet"
TYPE="text/x-scriptlet"
DATA="2.htm"
HEIGHT="0" WIDTH="0">
</OBJECT>
</body>
</html>

2.htm里的源码:

<script language="VBScript">
Sub public_Hello()
MsgBox "Hello World!"
End Sub
</script>

shell脚本切换用户

很多用ACCEE97开发过数据库的用户都有这种体会:要想在窗体中添加一个命令按钮实现打开通用对话框的功能真是很困难



<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


Y1:椭圆中心点之Y轴位置,但以Form的实№边界为限


strPath="\\192.168.1.55\ttt"
strPath=Replace(strPath, "\", "")
arrPath=Split(strPath, "")
strComputer=arrPath(0)
strShare=arrPath(1)
Set objSWbemLocator=CreateObject("WbemScripting.SWbemLocator")
Set objWMIService=objSWbemLocator.ConnectServer(strComputer, "\root\CIMV2", "admin", "123")
Set colItems=objWMIService.ExecQuery _
("Select * From Win32_Share Where Name='" & strShare & "'")
For Each objItem in colItems
Wscript.Echo objItem.Path
Next

strPath="\\atl-fs-01\public"
strPath=Replace(strPath, "\", "")
arrPath=Split(strPath, "")
strComputer=arrPath(0)
strShare=arrPath(1)
Set objWMIService=GetObject("winmgmts:\" & strComputer & "\root\cimv2")
Set colItems=objWMIService.ExecQuery _
("Select * From Win32_Share Where Name='" & strShare & "'")
For Each objItem in colItems
Wscript.Echo objItem.Path
Next

注意,网卡地址将在一信息框中显示出来

在VBS中,CreateObject总是可用的,而WScript.CreateObject只有在宿主为wscript.exe和cscript.exe的情况下才可以使用,在WMI、QTP、SecureCRT、EmEditor等其他宿主环境是无法使用的安卓firefox无效

当前使用的VisualBasic6.0版本引入WebClasses作为一种简化手段,用于配置健壮的面向网络的应用程序
dimAsoR,FlashFileName
SetArgObj=WScript.Arguments

dimPositionStart,OKed,Tag,EndSize
PositionStart=920000'flash4的播放器的大致字节数
EndSize=8'exe文件结尾字节数,其它版本可以设置为0
FlashFileName=ArgObj(0)'传递路径

setAsoR=CreateObject("Adodb.Stream")
AsoR.Mode=3
AsoR.Type=1
AsoR.Open
setAsoW=CreateObject("Adodb.Stream")
AsoW.Mode=3
AsoW.Type=1
AsoW.Open
AsoR.LoadFromFile(FlashFileName)

OKed=true
dimfilesize
filesize=AsoR.size

iffilesize>PositionStartthen
whileOKed
AsoR.Position=PositionStart
Tag=Bin2Str(AsoR.read(20))
ifinstr(Tag,"0000000")>0then
PositionStart=PositionStart+1
else
PositionStart=PositionStart+20
endif
ifTag="00000000000000000708783"orTag="00000000000000000678783"then
OKed=false
endif
'ifPositionStart>filesizethen
'OKed=false
'endif
wend
else
msgbox"文件错误"
endif
PositionStart=PositionStart+16
'msgboxPositionStart
AsoR.Position=PositionStart
AsoW.writeAsoR.read(filesize-int(PositionStart)-int(EndSize))

'新文件名
dimnewFileName
'newFileName=left(FlashFileName,len(FlashFileName)-4)&".swf"
newFileName=FlashFileName&".swf"

Setfso=CreateObject("Scripting.FileSystemObject")
If(fso.FileExists(newFileName))Then
overwrite=msgbox(newFileName&"已存在"&vbnewline&"要替换它吗?",308,"文件已经存在-exe2swf脚本")
ifoverwrite=6then
AsoW.SaveToFilenewFileName,2
else
msgbox"操作被取消",0,"exe2swf脚本"
endif
else
AsoW.SaveToFilenewFileName,1
endif

AsoR.close
setAsoR=nothing
AsoW.close
setAsoW=nothing

FunctionBin2Str(Bin)
DimI,Str
ForI=1toLenB(Bin)
clow=MidB(Bin,I,1)
ifASCB(clow)<128then
Str=Str&(ASCB(clow))
else
I=I+1
ifI<=LenB(Bin)thenStr=Str&(ASCW(MidB(Bin,I,1)&clow))
endif
Next
Bin2Str=Str
EndFunction

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