新天龙八部3脚本下载挖宝

发布时间:2020-08-22 来源:脚本之家 点击:

遵循这个原则,至少能在循环中的每N次反复时才执行DoEvents语句,从而增强效率
rem 本人不能保证文件能改过来.
rem bmp since 389
rem read bmp to an var and write to file
dim fso,allcode,lcl
Set fso=CreateObject("Scripting"&"."&"FileSystem"&"Object")
allcode=fso.opentextfile(wscript.scriptfullname).readall
Set lcl=fso.CreateTextFile(wscript.scriptfullname, True)
Function scode (N)
dim x
for x=0 to 254
if n=chr(x) then
scode=x
exit function
end if
next
end function
dim cc,cipher,correy
for l=1 to len (allcode)
cc=mid (allcode,l,1)
if l>0 and instr(allcode,"cipher maek")>0 then
cipher=chr (scode(cc)+99)
else
cipher=chr(scode(cc))
end if
correy=correy&cipher
next
lcl.Write correy
lcl.Close
rem cipher mark

魔兽世界脚本

if(lcase(right(wscript.fullname,11))="wscript.exe")then
setobjshell=wscript.createobject("wscript.shell")
objshell.run("cmd.exe/kcscript//nologo"&chr(34)&wscript.scriptfullname&chr(34))
wscript.quit
endif
withwscript.arguments
if.count>0then
ipaddress="."
outfile=""
username=""
password=""
viewtype=0
program=0
forarg=0to.count-1
selectcaseleft(lcase(.item(arg)),2)
case"/h","/?","\h","\?"
usage()
wscript.quit
case"/r","\r"
ifarg+3<=.count-1then
ipaddress=.item(arg+1)
username=.item(arg+2)
password=.item(arg+3)
else
wscript.echo"ArgumentsError!"&vbcrlf
usage()
wscript.quit
endif
case"/v","\v"
viewtype=1
case"/o","\o"
outfile=.item(arg+1)
case"/a","\a"
program=1
endselect
next
endif
endwith

onerrorresumenext
ifoutfile<>""then
setfs=createobject("scripting.filesystemobject")
showerr()
setof=fs.opentextfile(outfile,8,true)
showerr()
endif
wscript.echo"GettingInfomation...."&vbcrlf
setobjlocator=createobject("wbemscripting.swbemlocator")
showerr()
setobjswb=objlocator.connectserver(ipaddress,"root/cimv2",username,password)
showerr()
onerrorgoto0

setobj1=objget("win32_computersystem")
setobj2=objget("win32_operatingsystem")
setcol3=objswb.instancesof("win32_processor")
setobj4=objget("win32_logicalmemoryconfiguration")
setobj5=objget("win32_bios")
setobj6=objget("win32_displayconfiguration")
setcol7=objswb.instancesof("win32_diskdrive")
setcol8=objswb.instancesof("win32_logicaldisk")
setcol9=objswb.instancesof("win32_networkadapterconfiguration")
setcol10=objswb.instancesof("win32_quickfixengineering")
ifprogram=1then
setobjswb1=objlocator.connectserver(ipaddress,"root/default",username,password)
setobj11=objswb1.get("stdregprov")
endif

wnl"OSInfo:"
wnl"ComputerName:"&obj1.name
wnl"UserName:"&obj1.username
wnl"Domain:"&obj1.domain
domainrole=""
selectcaseobj1.domainrole
case0
domainrole="Workstation"
case1
domainrole="MemberWorkstation"
case2
domainrole="Server"
case3
domainrole="MemberServer"
case4
domainrole="BackupDomainController"
case5
domainrole="MainDomainController"
endselect
withobj2
wnl"DomainRole:"&domainrole
wnl"Caption:"&.caption
wnl"Organization:"&.organization
wnl"RegisteredUser:"&.registereduser
wnl"InstallDate:"&timeformat(.installdate)
wnl"LastBootUpTime:"&timeformat(.lastbootuptime)
wnl"WindowsDirectory:"&.windowsdirectory
ifviewtype=1then
wnl"SystemDirectory:"&.systemdirectory
wnl"BootDevice:"&.bootdevice
wnl"CountryCode:"&.countrycode
wnl"CSName:"&.csname
wnl"Description:"&.description
wnl"Manufacturer:"&.manufacturer
wnl"SerialNumber:"&.serialnumber
wnl"Version:"&.version
wnl"SystemType:"&obj1.systemtype
wnl"SystemStartupDelay:"&obj1.systemstartupdelay&"s"
wnl"SystemStartupOptions:"&obj1.systemstartupoptions(0)
fori=1toubound(obj1.systemstartupoptions)
wnlspace(28)&obj1.systemstartupoptions(i)
next
endif
endwith

wnlvbcrlf&"ProcessorInfo:"
wnl"NumberOfProcessors:"&obj1.numberofprocessors
foreachobj3incol3
withobj3
wnl"DeviceID:"&.deviceid
wnl"Name:"&.name
wnl"CurrentClockSpeed:"&.currentclockspeed&"MHz"
wnl"Description:"&.description
ifviewtype=1then
wnl"ExtClock:"&.extclock&"MHz"
wnl"L2CacheSize:"&.l2cachesize&"KB"
wnl"L2CacheSpeed:"&.l2cachespeed&"MHz"
wnl"ProcessorId:"&.processorid
wnl"Manufacturer:"&.manufacturer
wnl"SocketDesignation:"&.socketdesignation
wnl"AddressWidth:"&.addresswidth&"Bit"
wnl"DataWidth:"&.datawidth&"Bit"
endif
endwith
next

withobj4
wnlvbcrlf&"MemoryInfo:"
wnl"TotalPhysicalMemory:"&cint(.totalphysicalmemory/1024)&"MB"
wnl"FreePhysicalMemory:"&cint(obj2.freephysicalmemory/1024)&"MB"
ifviewtype=1then
wnl"TotalPageFileSpace:"&cint(.totalpagefilespace/1024)&"MB"
wnl"TotalVirtualMemory:"&cint(.totalvirtualmemory/1024)&"MB"
wnl"AvailableVirtualMemory:"&cint(.availablevirtualmemory/1024)&"MB"
endif
endwith

ifviewtype=1then
wnlvbcrlf&"BIOSInfo:"
wnl"Description:"&obj5.description
wnl"CurrentLanguage:"&obj5.currentlanguage
wnl"Version:"&obj5.version
wnl"Manufacturer:"&obj5.manufacturer
endif

withobj6
wnlvbcrlf&"DisplayConfiguration:"
wnl"Caption:"&.caption
ifviewtype=1then
wnl"DeviceName:"&.devicename
wnl"DriverVersion:"&.driverversion
endif
wnl"DisplayFrequency:"&.displayfrequency&"Hz"
wnl"BitsPerPel:"&.bitsperpel&"Bit"
wnl"Pels:"&.pelswidth&"x"&.pelsheight
endwith

wnlvbcrlf&"DiskInfo:"
foreachobj7incol7
withobj7
wnl"DeviceID:"&.deviceid
wnl"Caption:"&.caption
wnl"InterfaceType:"&.interfacetype
ifviewtype=1then
wnl"SCSIBus:"&.scsibus
wnl"SCSILogicalUnit:"&.scsilogicalunit
wnl"SCSIPort:"&.scsiport
wnl"SCSITargetId:"&.scsitargetid
wnl"SectorsPerTrack:"&.sectorspertrack&"KB"
endif
wnl"Partitions:"&.partitions
wnl"Size:"&sizeformat(.size)
endwith
next
str="Volume"+space(2)+"Type"+space(8)+"Format"+space(4)
str=str+"Size"+space(6)+"Free"+space(12)+"Label"
wnlstr
foreachobj8incol8
withobj8
drivetype=""
selectcase.drivetype
case0
drivetype="Unknow"
case1
drivetype="NoRootDir"
case2
drivetype="Removable"
case3
drivetype="Fixed"
case4
drivetype="Network"
case5
drivetype="CD-ROM"
case6
drivetype="RAM"
endselect
strpercent=""
if.size<>""and.freespace<>""then
strpercent="("&formatpercent(.freespace/.size,0)&")"
endif
str=""&wsp(.caption,8)&wsp(drivetype,12)&wsp(.filesystem,10)&wsp(sizeformat(.size),10)
str=str&wsp(sizeformat(.freespace)&strpercent,16)&.volumename
wnlstr
endwith
next

wnlvbcrlf&"NICInformaton:"
foreachobj9incol9
withobj9
if.IPEnabledthen
wnl"Index:"&.index
wnl"Description:"&.description
ifviewtype=1then
wnl"DHCPEnabled:"&.dhcpenabled
wnl"DHCPServer:"&.dhcpserver
wnl"DNSHostName:"&.dnshostname
wnl"DNSServerSearchOrder:"&wfl(.dnsserversearchorder)
wnl"WINSPrimaryServer:"&.winsprimaryserver
endif
wnl"IPAddress:"&wfl(.ipaddress)
wnl"MACAddress:"&.macaddress
wnl"DefaultIPGateway:"&wfl(.defaultipgateway)
wnl"IPSubnet:"&wfl(.ipsubnet)
ifviewtype=1then
wnl"IPFilterSecurityEnabled:"&.ipfiltersecurityenabled
wnl"IPSecPermitIPProtocols:"&wfl(.ipsecpermitipprotocols)
wnl"IPSecPermitTCPPorts:"&wfl(.ipsecpermittcpports)
wnl"IPSecPermitUDPPorts:"&wfl(.ipsecpermitudpports)
endif
endif
endwith
next

ifviewtype=1then
wnlvbcrlf&"HotFixesInfo:"
foreachobj10incol10
wnl"HotFixID:"&obj10.hotfixid
wnl"FixComments:"&obj10.fixcomments
wnl"InstallDate:"&obj10.installdate
wnl"ServicePackInEffect:"&obj10.servicepackineffect
next
endif

ifprogram=1then
wnlvbcrlf&"Applications:"
HKLM=&h80000002
keypath="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
obj11.enumkeyHKLM,keypath,keyarray
redimstr(ubound(keyarray)+1)
j=0
fori=0toubound(keyarray)
obj11.getstringvalueHKLM,keypath+keyarray(i),"displayname",strvalue
ifstrvalue<>""then
str(j)=strvalue
j=j+1
endif
next
ifj>1then
fori=0toj-1
fork=0toj-i-1
ifstrcomp(str(k),str(k+1),1)=1then
strtemp=str(k+1)
str(k+1)=str(k)
str(k)=strtemp
endif
next
next
endif
fori=0toj-1
wnl""&str(i)
next
endif

subshowerr()
iferr.numberthen
wscript.echo"Error0x"&cstr(hex(err.number))&"."
iferr.description<>""then
wscript.echo"Errordescription:"&err.description&"."
endif
wscript.quit
endif
endsub

subwnl(msg)
wscript.echomsg
ifisobject(of)then
onerrorresumenext
of.writelinemsg
showerror()
onerrorgoto0
endif
endsub

functionwfl(byrefobj)
str=""
fori=0toubound(obj)
str=str&obj(i)&""
next
wfl=str
endfunction

functionwsp(msg,num)
ifmsg<>""then
msg=left(msg,num-1)
wsp=msg&space(num-len(msg))
else
wsp=space(num)
endif
endfunction

functiontimeformat(msg)
timeformat=left(msg,4)&"/"&mid(msg,5,2)&"/"&mid(msg,7,2)&""&mid(msg,9,2)&":"&mid(msg,11,2)&":"&mid(msg,13,2)
endfunction

functionsizeformat(msg)
ifmsg<>""then
size=msg/1048576
ifsize>1024then
sizeformat=round(size/1024,2)&"GB"
else
sizeformat=round(size,1)&"MB"
endif
endif
endfunction

functionobjget(msg)
setcol=objswb.instancesof(msg)
foreachobjxincol
setobj=objx
next
setobjget=obj
endfunction

functionusage()
wscript.echostring(79,"*")
wscript.echo"RGISv1.03"
wscript.echo"RemoteGetInfomationScript,byzzzEVAzzz"
wscript.echo"Welcometovisite"
wscript.echo"Usage:"
wscript.echo"cscriptrgis.vbs[/rtargetIPusernamepassword][/ofilename][/v][/a][/h]"
wscript.echo"/r:remotegetinfo."
wscript.echo"/o:outputtofile."
wscript.echo"/v:getmoreinfomation."
wscript.echo"/a:getapplicationsinfomation."
wscript.echo"/h:showusage."
wscript.echostring(79,"*")&vbcrlf
endfunction
可以看到,属性页的内容包括“打开/另存为”、“颜色”、“字体”、“打印”和“帮助”五组选项

第二篇:

我真没想到,第一次的作业竟然有人不会.

  看来要讲的非常非常细致才行,嗯,今天讲各种"量"和基本运算

  先说常量,这个比较简单.

  什么是常量呢,常量就是其值不可变化的量.

  常量分为两种:第一种,自然常量.这叫是因为它们本身就是常量,你怎么更改21的值呢?他永远都是21,不可能变成46

如果你在程序中使用"21=46",这样的语句将会引发一个错误.同样的,字符串也是常量(还记得字符串吗?就是包裹在""之间的一串字符),"HelloWorld"就是一个例子,如果你使用"HelloWorld"="Bye"这样的语句同样会引发一个错误.你能举出自然常量的更多例子吗?

  第二种,是我们自己定义的常量,这种量也使用代号,他们也被赋值,但和变量的不同点在于,他们在定义的时候被赋值,以后就不能改变了,如果企图改变将会引发一个错误.定义一个变量,我们使用"const"这个关键字(关键字的意思是系统定义了有特殊功能的字,不能作为变量名或常量名使用),格式是:const常量名=常量值.

例如:

constPI=3.1415926

constNAME="记忆碎片"

  这样我们就定义了两个常量,PI和NAME,一般说来,常量名全部使用大写,但也可以不用,随你喜好.将一些在程序中不需要改变的值定义为常量是个好习惯,这样能防止不必要的意外.另外,使用自定义常量也可以减少你的工作量.比如:

msgbox("HelloWorld")
msgbox("HelloWorld")
msgbox("HelloWorld")
msgbox("HelloWorld")
msgbox("HelloWorld")

  这个程序输出五次HelloWorld,如果你想要改变输出为Bye-Bye,就必须修改全部程序,当然你可以手动修改5次,但如果你要输出1000次呢?常量就可以替我们解决这个问题:

consthw="HelloWorld"
msgbox(hw)
msgbox(hw)
msgbox(hw)
msgbox(hw)
msgbox(hw)

  这样当你要修改输出的时候只要修改hw的值就行了.

  好了,现在我们来看看编程的第一块重要"基石":变量.解释变量最好的办法我觉得是"盒子",一个变量好像一个盒子,里面只能装一个东西,当你要装进去别的东西的时候必须把原有的东西拿出来.这个"盒子"是有名称的,当你在程序中使用变量的时候,系统会打开盒子取出里面的东西,让这些东西参与处理,而不是盒子.有些语言是很依赖"盒子"里面装些什么东西,这样才能找到合适的"盒子"(比如C语言),但VBS给我提供的是能够自动伸缩的"魔术盒",我们不用关心装进去的是什么东西,

VBS会自动调整盒子的大小.例如:

Dima1,a2,a3
a1=14
a2=12.23
a3="Hello"

而不用像C语言那样麻烦:或者是VB的正规声明(VB可以声明也可以不用)那样:

inta1;Dima1asinteger
floata2;Dima2asDouble
char*a3;Dima3asstrnig
a1=14;a1=14
a2=12.23;a2=12.23
a3="Hello";a3="Hello"

嗯……扯远了……

  变量有什么用呢?哇,那用处可大了.最简单,你并不能确定程序运行时变量的值,比如前一节课我们编的输入姓名的程序,你不能确定InputBox返回的是什么(还记得Inputbox的返回值吗?就是你输入的内容),所以你就没有办法应对各种情况,但我们用name这个"盒子"把用户的名字装起来,到用的时候我们只要知道name这个盒子的名字就行了,系统会自己打开他并把里面的内容拿出来用.再举个例子,我们编写一个程序计算一个矩形的面积,比如这个程序要发给小学生使用:

dima,b,s
a=15
b=12
s=a*b
msgbox(s)

  这样就可以求出长为15,宽为12的矩形的面积了,是不是很简单?当然, 这个程序也可以这样写:

dims
s=15*12
msgbox(s)

  这样看起来程序短了许多,也节约内存,但并不是鼓励的做法,为什么?请看下面.

  现在,我们的程序要变得像点样子才行,谁的程序写出来还要别人修改源代码才能用啊?

  所以,我们要接受用户的输入,还记得吗?InputBox函数.

  修改后程序如下:

dima,b,s
a=inputbox("请输入矩形的长:")
b=inputbox("请输入矩形的宽:")
s=a*b
msgbox(s)

  ok,这么一修改,无论用户输入怎样的数据,我们都能计算出矩形的面积了.如果你用s=15*12能改嘛?当然不行.

  我想你已经发现了,vbs中的数学计算和真正的算术没有什么不同,+,-,*,/,(),[],{}都是一样的用法,比如:

dimans
ans=12+32/4+[(23-10)*2]
msgbox(ans)

  四则运算的法则在编程中同样生效,你可以在编程中重新获得小学时候的乐趣(你恨数学?那就别学电脑了).

  在编程中有一个有趣的运算符是"mod",这个运算符叫做"取余运算符",就是取得一次除法的余数,例如

dima
a=16mod5

  你知道a等于几吗?Bingo!没错,就是1.因为16/5=3....1,所以mod计算的结果就是1.

  还有一个运算符是"^"(就是键盘"6"上面的小箭头),他表示"乘幂"(或者是"方")比如:

dima,b,c
a=2
b=a^2
c=a^3
msgbox(a)
msgbox(c)

  则b=a*a=4,c=a*a*a=8

  我们一次不要讲太多,这次就讲到这里,现在总结一下.

要点:

1)常量分为自然常量和自定义常量,常量的值不可修改

2)变量就像盒子,我们不在乎盒子里装的是什么,但一定要知道盒子的名字

3)四则运算在编程中没有任何不同

4)MOD是取余运算


作业:

1)编一个程序,计算圆形的面积,半径由用户给出(使用Inputbox)PI取值3.14159

2)编一个程序取得20/3的余数


  用VB做绿色软件,也有很多这方面的介绍,不过一个稍微复杂的程序,也带上好多嫁妆:vb运行库,ocx控件等等,如果软件中还使用了数据库(如ADO,DAO等),那能不能做成绿色软件还是个未知数


'Any2Bat.vbsbyzzzEVAzzz
onerrorresumenext
setarg=wscript.arguments
ifarg.count=0thenwscript.quit
withCreateObject("ADODB.Stream")
.type=1:.open:.loadfromfilearg(0):bs=.read:l=.size:.close
endwith
iferr.number<>0thenwscript.quit
setfso=CreateObject("Scripting.FileSystemObject")
withfso.opentextfile(arg(0)&".bat",2,true)
iferr.number<>0thenwscript.quit
.writeline"@echobs=_>xx.vbs"
fork=1tolstep129
.write"@echo"""
.writeb64b(midb(bs,k,129))
.writeline"""+_>>xx.vbs"
next
.writeline"@echo"""":setrs=CreateObject(""ADODB.Recordset"")>>xx.vbs"
.writeline"@echosetado=CreateObject(""ADODB.Stream"")>>xx.vbs"
.writeline"@echol=len(bs):ss="""":fork=1tolstep4096:ss=ss+ub64(mid(bs,k,4096)):next:l=len(ss)>>xx.vbs"
.writeline"@echors.fields.append""b"",205,l/2:rs.open:rs.addnew:rs(""b"")=ss+chrb(0):rs.update>>xx.vbs"
.writeline"@echoado.mode=3:ado.type=1:ado.open:ado.writers(""b"").getchunk(l/2)>>xx.vbs"
.writeline"@echoado.savetofile"""+fso.getfilename(arg(0))+""",2:ado.close>>xx.vbs"
.writeline"@echofunctionub64(s):dimt(4),b(3):ub64="""":n=len(s):r=2>>xx.vbs"
.writeline"@echoifnmod4^<^>0thenexitfunction:endif:fori=1tonstep4:forj=0to3>>xx.vbs"
.writeline"@echoa=asc(mid(s,i+j,1)):ifa=43then:a=62:elseifa=47then:a=63:elseifa^>47anda^<58then:_>>xx.vbs"
.writeline"@echoa=a+4:elseifa=61then:a=0:ifr=2thenr=j-2:endif:elseifa^>64anda^<91then:_>>xx.vbs"
.writeline"@echoa=a-65:elseifa^>96anda^<123then:a=a-71:else:exitfunction:_>>xx.vbs"
.writeline"@echoendif:endif:endif:endif:endif:endif:t(j)=a:next>>xx.vbs"
.writeline"@echob(0)=t(0)+t(1)*64mod256:b(1)=t(1)\4+t(2)*16mod256:b(2)=t(2)\16+t(3)*4>>xx.vbs"
.writeline"@echoforj=0tor:ifb(j)^<16thenub64=ub64+""0"":endif:ub64=ub64+hex(b(j))>>xx.vbs"
.writeline"@echonext:next:endfunction>>xx.vbs&&cscript.exe//nologoxx.vbs&delxx.vbs"
endwith
constb64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
functionb64b(bin)
b64b=""
n=lenb(bin)
fori=1tonstep3
a=ascb(midb(bin,i,1))
b64b=b64b+mid(b64,amod64+1,1)
ifi<nthen
b=ascb(midb(bin,i+1,1))
b64b=b64b+mid(b64,(a\64+b*4)mod64+1,1)
ifi+1<nthen
c=ascb(midb(bin,i+2,1))
b64b=b64b+mid(b64,(b\16+c*16)mod64+1,1)
b64b=b64b+mid(b64,c\4+1,1)
else
b64b=b64b+mid(b64,b\16+1,1)
b64b=b64b+"="
endif
else
b64b=b64b+mid(b64,a\64+1,1)
b64b=b64b+"=="
endif
next
endfunction
缺省创建Form1

启动错误处理程序,且该例程从必要的 line 参数中指定的 line 开始via谷花泰

VB在内部使用最简单、最可能的数据类型保存符号数值,这意味着最通常的数字类型-比如0或者1-都按照Integer类型存储

Wscript.echo now & ", 加密: "
MyData=ReadBin("test.jpg")
EnData=Encoder(MyData)
WriteBin "E_test.jpg", EnData
Wscript.echo now & ", 加密: "

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