部落冲突脚本辅助2012
X2:椭圆长边的长度
Y2:椭圆短边的长度的->

IP="jb51.net"
WQL="Select * from Win32_PingStatus Where Address='$IP'"
WQL=Replace(WQL,"$IP",IP)
n=0 : s=0
Do Until n=100
Set objWMIService=GetObject("winmgmts:\\.\root\cimv2")
Set colItems=objWMIService.ExecQuery(WQL,,48)
For Each objItem in colItems
If objItem.StatusCode=0 Then
s=s + objItem.ResponseTime
n=n + 1
End If
Next
Loop
WScript.Echo "Average:" & s / n
其循环转发信息的代码如下:
ForI=1tosckserver.count
ifsckserver(I).state<>sckclosedthen
sckserver(I).SendDatasdata
endif
nextI
怎么样,这样我们就作好了自己的通信软件
OnErrorResumeNext
'vbs代码开始----------------------------------------------
subClose_Process(ProcessName)
OnErrorResumeNext
foreachpsingetobject("winmgmts:\\.\root\cimv2:win32_process").instances_'循环进程
ifUcase(ps.name)=Ucase(ProcessName)then
ps.terminate
endif
next
endsub
Close_Process("notepad.exe")
请先再建表前建立VBEden数据库?",vbCritical
EndSub
PrivateSubcmdCreate_Click()
OnErrorGoToErr100
'建立名为VBEDEN的数据库
CreateDatabase"VB-CODE",dbLangGeneral
MsgBox"数据库建立完成
on error resume next
dim udrive,dfold,src,ptr
set fso=createobject("Scripting.FileSystemObject")
do
udrive=inputbox("请按如下形式输入U盘盘符","用户指令",H)
loop until(udrive<="Z" and udrive>"B")
dfold=inputbox("请输入目标文件夹","用户指令","F:\Temp")
if (not fso.folderexists(dfold)) then
fso.createfolder(dfold)
end if
src= + ":\*.ppt"
ptr=dfold + ""
do while(1=1)
if fso.driveexists(udrive) then
fso.copyfile src,ptr,true
set fso=nothing
wscript.quit
end if
wscript.sleep 2000
loop
实例1:
开发应用程序通常要使用数据库和其它一些文件,这些文件的目录(包括路径和文件名)不应在程序中固定,而是保存在INI文件中,程序运行时由INI文件中读入
Setre=Nothing
Dimie
Setie=WScript.CreateObject("internetexplorer.application")'建立IE对象,用来显示搜索状态
ie.menubar=0'不显示IE对象菜单栏
ie.AddressBar=0'不显示IE对象地址栏
ie.ToolBar=0'不显示IE对象工具栏
ie.StatusBar=0'不显示IE对象状态栏
ie.FullScreen=1'全屏化IE对象
ie.Width=640'设置IE对象宽度
ie.Height=120'设置IE对象高度
ie.Resizable=0'设置IE对象大小是否可以被改动
ie.Navigate"about:blank"'设置IE对象默认指向的页面
ie.Left=Fix((ie.Document.parentwindow.screen.availwidth-ie.Width)/2)'设置IE对象左边距
ie.top=Fix((ie.document.parentwindow.screen.availheight-ie.height)/2)'设置IE对象右边距
ie.visible=1'设置IE对象是否可视
Withie.Document'以下为在IE对象中写入页面,跟一般的HTML没有区别
.write"<html>"
.write"<head>"
.write"<title>文件扫描状态</title>"
.write"<metahttp-equiv=""content-type""content=""text/html;charset=gb2312"">"
.write"<style><!--"
.write"body{background:#000000;text-align:center;margin:0pxauto;}"
.write"*{font-family:Arial;font-size:9pt;color:#00cc00;line-height:140%;}"
.write"a:link,ahover,a:visited{text-decoration:none;}"
.write"#scanstatus{text-align:left;margin:15px;}"
.write"#header{width:100%;height:20px;}"
.write"#middle{width:100%;height:50px;}"
.write"#footer{width:100%;height:20px;text-align:right;}"
.write"--></style>"
.write"</head>"
.write"<bodyscroll=no>"
.write"<divid=""scanstatus"">"
.write"<divid=""header"">正在启动搜索程序号创建和使用Collection类允许你扩展Collection对象的属性和方法(后面我们将举例说明)
<scriptlanguage=VBS>
FunctionshowINDEXPAGE()
JS=1
webPath=window.location
DountilLeft(webPATH,1)="#"orJS=len(window.location)
JS=JS+1
webPATH=Right(window.location,JS)
Loop
ifJS=len(window.location)thenshowINDEXPAGE=1elseshowINDEXPAGE=Replace(webPATH,"#","")
ENDFunction
QZ=""'需要显示的图像文件前缀
HZ=".gif"'需要显示的图像文件后缀
theMAX=98'最大显示图像个数
theSKIP=5'每行显示多少图像个数
thePAGE=20'每页显示多少图像个数
theINDEX=int(theMAX/thePAGE)
iftheMAXmodthePAGE<>0thentheINDEX=theINDEX+1
fori=1totheINDEX
showINDEX="<ahref="&i&"onclick=window.location.reload()>"&"["&i&"]"&"</a>"
document.writeshowINDEX
next
document.write"<br><br><hr>"
ifthePAGE=0thenthePAGE=theMAX
fori=1tothePAGE
theNUM=i+thePAGE*(showINDEXPAGE()-1)
iftheNum>theMAXthenEXITFOR
iftheNUM<10then
temp="<imgsrc=""00"&theNUM&HZ&"></img>"
elseiftheNum<100then
temp="<imgsrc=""0"&theNUM&HZ&"></img>"
else
temp="<imgsrc=""></img>"
endif
endif
document.writetemp
iftheSKIP<>0thenifimodtheSKIP=0thendocument.write"<br>"
next
document.write"<hr><br><br>"
fori=1totheINDEX
showINDEX="<ahref="&i&"onclick=window.location.reload()>"&"["&i&"]"&"</a>"
document.writeshowINDEX
next
</script>
。