lol脚本英雄博图wincc

发布时间:2020-11-14 来源:脚本之家 点击:

->

1.上传的时候可以将图片高宽存到数据库里,用的时候调出来判断,但那种方法相比较下边的麻烦.
2.用VBSCRIPT里的一个函数loadpicture
picurl'图片地址
'取出高宽

使用图片前选调出来并取得图片大小
setmyImg=loadpicture(server.mappath(picurl))
iWidth=round(myImg.width/26.4583)
iHeight=round(myImg.height/26.4583)

调用时用iwidth和iheight判断就可以了,

linux shell脚本语法
我知道 用IPSEC也可以做到只让某IP访问访问,用netstat -an 可以看某IP正在访问我机器的3389端口,我想做监视 让某IP访问时 然后报警 或者输入 >*.txt 这样
  函数中虽然有四个参数,但关键的是前两个:hwnd和wMsg


'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中的代码:
在Declare中定义全局变量:
Constbmpfilemax=5&总共5个bmp文件
Dimbmpfile(bmpfilemax)AsString&bmp文件的文件名数组
Dimdrawbmpmode(bmpfilemax)AsInteger&各画显示时的切换方式
Dimbmpnum,movestep,xmax,ymaxAsInteger
DimkxyAsSingle&x,y二个方向的比例
程序运行时先作初始化工作:
PrivateSubForm-Load()
bmpnum=0&当前文件号=0,第一个文件
bmpfile(0)=App.Path ''\bmp1.bmp''bmpfile(1)=App.Path ''\bmp2.bmp''
bmpfile(2)=App.Path ''\bmp3.bmp''
bmpfile(3)=App.Path ''\bmp4.bmp''
bmpfile(4)=App.Path ''\bmp5.bmp''
drawbmpmode(0)=1
drawbmpmode(1)=5
drawbmpmode(2)=3
drawbmpmode(3)=4
drawbmpmode(4)=2
movestep=0&步进参数
xmax=Form.ScaleWidth/2
ymax=Form.ScaleHeight/2
kxy=ymax/xmax
Picture1.Picture=LoadPicture(bmpfile(bmpnum))
Timer1.Interval=30&定时器起动
EndSub
响应鼠标:

PrivateSubForm-Click()
End&当有击鼠标动作时程序结束
EndSub

切换演示工作主要在定时器中完成:
PrivateSubTimer1-Timer()
hDestDC=Form1.HDC&目标DC
hSrcDC=Picture1.hDC&源DC,画是从不可见的Picture1中拷贝到窗体
drawflag=drawbmpmode(bmpnum)&当前画出现的方式
SelectCasedrawflag
Case1&从中间逐步放大
endmax=xmax&用于结束判断
X1=xmax-movestep
w=movestep*2
Y1=Cint(ymax-movestep*kxy)
h=Cint(2*movestep*kxy)
i=BitBlt(hDestDC,X1,Y1,w,h,hSrcDC,X1,Y1,SRCCOPY)
Case2&从左到右
endmax=xmax
w=movestep*2
h=Form1.ScaleHeight
i=BitBlt(hDestDC,0,0,w,h,hSrcDC,X1,Y1,SRCCOPY)

Case3'左右向中间
endmax=xmax
w=movestep
h=Form1.ScaleHeight
i=BitBlt(hDestDC,0,0,w,h,hSrcDC,0,0,SRCCOPY)&左面部分
X1=Form1.ScaleWidth-movestep
i=BitBlt(hDestDC,X1,0,w,h,hSrcDC,X1,0,SRCCOPY)&左面部分
Case4'栅条状
endmax=CInt(2*xmax/10)&共分阶10条
tempi=CInt(2*xmax/10)
w=movestep
h=Form1.ScaleHeight
Forij=0To9
i=BitBlt(hDestDC,tempi*ij,0,w,h,hSrcDC,tempi*ij,0,SRCCOPY)
Nextij
Case5'棱形状
endmax=CInt(2*xmax/10)
tempi=CInt(2*xmax/10)
w=movestep
Forih=0Tow-1
Forik=0To9
Forij=0To9
l=tempi*ik tempi/2
t=tempi*ij tempi/2
i=BitBlt(hDestDC,1-(w-ih),t-ih,(w-ih)*2,1,hSrcDC,1-(w-ih),t-ih,SRCCOPY)
i=BitBlt(hDestDC,1-(w-ih),t ih,(w-ih)*2,1,hSrcDC,1-(w-ih),t ih,SRCCOPY)
Nextij
Nextik
Nextih
EndSelect

Form1.Refresh

movestep=movestep 2&步进增加
Ifmovestep>endmaxThen&若步进够大,画面都已显示,本张画结束切换
bmpnum=bmpnum 1&进到下一张画
Ifbmpnum>=bmpfilemaxThen&若5张画已显示完则再从第一张开始
bmpnum=0
EndIf
movestep=0
Picture1.Picture=LoadPicture(bmpfile(bmpnum))
EndIf
EndSub->->


它并不一定是万无一失的方法,但好像还管用

----下面有一段放在Form_Unload事件(或者其他退出模块中)中的一小段代码例子,它演示了关闭所有打开的DAO工作台、数据库和记录并释放了被这些对象占用的内存

"
幽灵键鼠入

----5)InBufferCount:返回接收缓冲区内的等待读取的字节个数,可通过设置该属性为0来清除接收缓冲区
on error resume next
url=" "
username="***"
password="***"
set ie=CreateObject("InternetExplorer.Application")
ie.visible=true
ie.Navigate url,4 ' " "
do until 4=ie.readyState
WScript.sleep 200
waittime=waittime + 200
if waittime > 15000 then exit do
loop
'WScript.echo waittime
if 4<>ie.readyState then
ie.quit
WScript.quit
end if
set dom=ie.document
set form=dom.getElementById("loginform")
form.all("username").value=username
form.all("password").value=password
form.all("cookietime").checked=true
form.all("loginsubmit").click()

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