小儿高热惊厥应急演练脚本算卦吗

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

->OptionExplicit
PrivateSubCommand1_Click()
DimIAsLong,JAsLong,KAsLong
DimPrintStringAsString
ForI=0ToData1.Recordset.RecordCount-1
IfK=DBGrid1.VisibleRowsThen
DBGrid1.Scroll0,DBGrid1.VisibleRows
K=0
EndIf
ForJ=0ToDBGrid1.Columns.Count-1
PrintString=PrintString&
DBGrid1.Columns(J).CellText(DBGrid1.RowBookmark(K))&"/"
Next
Printer.PrintPrintString
PrintString=""
K=K 1
DoEvents
Next
EndSub

PrivateSubForm_Activate()
Data1.Recordset.MoveLast
Data1.Recordset.MoveFirst
EndSub->
->


'XML Upload Class
Class XMLUpload
Private xmlHttp
Private objTemp
Private adTypeBinary, adTypeText
Private strCharset, strBoundary

Private Sub Class_Initialize()
adTypeBinary=1
adTypeText=2
Set xmlHttp=CreateObject("Msxml2.XMLHTTP")
Set objTemp=CreateObject("ADODB.Stream")
objTemp.Type=adTypeBinary
objTemp.Open
strCharset="utf-8"
strBoundary=GetBoundary()
End Sub

Private Sub Class_Terminate()
objTemp.Close
Set objTemp=Nothing
Set xmlHttp=Nothing
End Sub

'指定字符集的字符串转字节数组
Public Function StringToBytes(ByVal strData, ByVal strCharset)
Dim objFile
Set objFile=CreateObject("ADODB.Stream")
objFile.Type=adTypeText
objFile.Charset=strCharset
objFile.Open
objFile.WriteText strData
objFile.Position=0
objFile.Type=adTypeBinary
If UCase(strCharset)="UNICODE" Then
objFile.Position=2 'delete UNICODE BOM
ElseIf UCase(strCharset)="UTF-8" Then
objFile.Position=3 'delete UTF-8 BOM
End If
StringToBytes=objFile.Read(-1)
objFile.Close
Set objFile=Nothing
End Function

'获取文件内容的字节数组
Private Function GetFileBinary(ByVal strPath)
Dim objFile
Set objFile=CreateObject("ADODB.Stream")
objFile.Type=adTypeBinary
objFile.Open
objFile.LoadFromFile strPath
GetFileBinary=objFile.Read(-1)
objFile.Close
Set objFile=Nothing
End Function

'获取自定义的表单数据分界线
Private Function GetBoundary()
Dim ret(12)
Dim table
Dim i
table="abcdefghijklmnopqrstuvwxzy0123456789"
Randomize
For i=0 To UBound(ret)
ret(i)=Mid(table, Int(Rnd() * Len(table) + 1), 1)
Next
GetBoundary="---------------------------" & Join(ret, Empty)
End Function

'设置上传使用的字符集
Public Property Let Charset(ByVal strValue)
strCharset=strValue
End Property

'添加文本域的名称和值
Public Sub AddForm(ByVal strName, ByVal strValue)
Dim tmp
tmp="\r\n--$1\r\nContent-Disposition: form-data; name=""$2""\r\n\r\n$3"
tmp=Replace(tmp, "\r\n", vbCrLf)
tmp=Replace(tmp, "$1", strBoundary)
tmp=Replace(tmp, "$2", strName)
tmp=Replace(tmp, "$3", strValue)
objTemp.Write StringToBytes(tmp, strCharset)
End Sub

'设置文件域的名称/文件名称/文件MIME类型/文件路径或文件字节数组
Public Sub AddFile(ByVal strName, ByVal strFileName, ByVal strFileType, ByVal strFilePath)
Dim tmp
tmp="\r\n--$1\r\nContent-Disposition: form-data; name=""$2""; filename=""$3""\r\nContent-Type: $4\r\n\r\n"
tmp=Replace(tmp, "\r\n", vbCrLf)
tmp=Replace(tmp, "$1", strBoundary)
tmp=Replace(tmp, "$2", strName)
tmp=Replace(tmp, "$3", strFileName)
tmp=Replace(tmp, "$4", strFileType)
objTemp.Write StringToBytes(tmp, strCharset)
objTemp.Write GetFileBinary(strFilePath)
End Sub

'设置multipart/form-data结束标记
Private Sub AddEnd()
Dim tmp
tmp="\r\n--$1--\r\n"
tmp=Replace(tmp, "\r\n", vbCrLf)
tmp=Replace(tmp, "$1", strBoundary)
objTemp.Write StringToBytes(tmp, strCharset)
objTemp.Position=2
End Sub

'上传到指定的URL,并返回服务器应答
Public Function Upload(ByVal strURL)
Call AddEnd
xmlHttp.Open "POST", strURL, False
xmlHttp.setRequestHeader "Content-Type", "multipart/form-data; boundary=" & strBoundary
'xmlHttp.setRequestHeader "Content-Length", objTemp.size
xmlHttp.Send objTemp
Upload=xmlHttp.responseText
End Function
End Class

Dim UploadData
Set UploadData=New XMLUpload
UploadData.Charset="utf-8"
UploadData.AddForm "content", "Hello world" '文本域的名称和内容
UploadData.AddFile "file", "test.jpg", "image/jpg", "test.jpg"
WScript.Echo UploadData.Upload("")
Set UploadData=Nothing
gg修改器lua脚本解密

Dimconnstr,conn
Dimsql,rs,msg

SubOpenDB()
ConnStr="DSN=51tiao.Com;UID=sa;PWD=;"
IfNotIsObject(Conn)Then
Setconn=CreateObject("Adodb.Connection")
Conn.OpenConnStr
EndIf
EndSub

OpenDB()
Send()
CloseDB()

SubSend()
OnErrorResumeNext'有错继续执行
'邮件内容
msg="<html><head><title>上海跳蚤市场今日推荐"&Date()&"</title>"&VBCRLF_
&"<METANAME=""Author""CONTENT=""清风,QQ:110125707,MSN:anwellsz@msn.com"">"&VBCRLF_
&"<styletype='text/css'>"&VBCRLF_
&"<!--"&vbcrlf_
&"td,form,select,input,p,table,.font{font-size:12px;line-height:20px}"&VBCRLF_
&"a:link{color:#000000;font-size:12px;text-decoration:none}"&VBCRLF_
&"a:visited{color:#000000;font-size:12px;text-decoration:none}"&VBCRLF_
&"a:hover{color:#ff7f2c;font-size:12px;text-decoration:underline}"&VBCRLF_
&"-->"&VBCRLF_
&"</style>"&VBCRLF_
&"</head><body>"&VBCRLF_
&"<tablewidth=640>"&VBCRLF_
&"<tr><tdalign=right>今日推荐信息"&Year(Date())&"年"&Month(Date())&"月"&Day(Date())&"日<ahref=""""target=""_blank""><FONTsize=3><b>上海跳蚤市场</b></font></a></td></tr></table></div></td></tr></table>"&VBCRLF_
&"<tablewidth=640>"&VBCRLF_
&"<trbgColor='#FF9D5C'><tdheight=3></td></tr><tr><td></td></tr><tr>"&VBCRLF_
&"<td>"&VBCRLF_
&"<ul>"&VBCRLF_
&"<p>"
sql="selectdistincttop100a.infoid,a.Strtitlefromnewinfoarticlea"_
&"innerjoinNewinfopropb"_
&"ona.infoid=b.infoidanda.intgood=1anda.intshenhe=1andb.rid1=908anddatediff(d,createtime,getdate())=0"_
&"orderbya.infoiddesc"
Setrs=conn.execute(sql)
Ifrs.eofThen
Wscript.Echo"没有记录!"
rs.close:Setrs=Nothing
ExitSub
EndIf
DoWhileNotrs.eof
msg=msg&"★ <ahref="""&rs("infoid")&"""title="""&rs("strtitle")&"""target=""_blank"">"_
&rs("Strtitle")&"</a><br>"&VBCRLF
Rs.MoveNext
Loop
Rs.close:setRs=Nothing
msg=msg&"</ul></p>"&VBCRLF_
&"</td>"&VBCRLF_
&"</tr><tr><td></td></tr><trbgColor='#FF9D5C'><tdheight=3></td></tr>"&VBCRLF_
&"<tralign=right><td><ahref=""""target=""_blank""><FONTface='ArialBlack'size=3>51Tiao.Com</FONT></a></td></tr>"&VBCRLF_
&"</table><p></p></body></html>"

'取得邮件地址
Dimi,total,jmail
i=1
DimBadMail'不接收的邮件列表格式'邮件地址','邮件地址'
BadMail="'123@163.com','122@126.com'"
sql="Selectdistinctb.stremailFromuserinfoainnerjoinuserinfo_1b"_
&"ona.id=b.intuseridandb.stremail<>''and(charindex('3',a.StruserLevel)>0orcharindex('4',a.StruserLevel)>0)"_
&"andb.stremailnotin("&BadMail&")"_
&"orderbyb.stremail"
Setrs=CreateObject("Adodb.Recordset")
rs.opensql,conn,1,1
total=rs.recordcount
Ifrs.eofThen
Wscript.Echo"没有用户!"
rs.close:Setrs=Nothing
ExitSub
EndIf

'每二十个邮件地址发送一次
Fori=1Tototal
IfiMod20=1Then
Setjmail=CreateObject("JMAIL.Message")'建立发送邮件的对象
'jmail.silent=true'屏蔽例外错误,返回FALSE跟TRUE两值
jmail.Logging=True'记录日志
jmail.Charset="GB2312"'邮件的文字编码
jmail.ContentType="text/html"'邮件的格式为HTML格式或纯文本
EndIf
jmail.AddRecipientrs(0)
IfiMod20=0Ori=665Then
jmail.From="infoAt51tiao"'发件人的E-MAIL地址
jmail.FromName="上海跳蚤市场"'发件人的名称
jmail.MailServerUserName="info"'登录邮件服务器的用户名(您的邮件地址)
jmail.MailServerPassword="123123"'登录邮件服务器的密码(您的邮件密码)
jmail.Subject="上海跳蚤市场今日推荐"&Year(Date())&"年"&Month(Date())&"月"&Day(Date())&"日"'邮件的标题
jmail.Body=msg'邮件的内容
jmail.Priority=3'邮件的紧急程序,1为最快,5为最慢,3为默认值
jmail.Send("mail.51tiao.com")'执行邮件发送(通过邮件服务器地址)
jmail.Close()
setjmail=Nothing
EndIf
rs.movenext
Next
rs.close:Setrs=Nothing

'记录日志在C:\jmail年月日.txt
ConstDEF_FSOString="Scripting.FileSystemObject"
Dimfso,txt
Setfso=CreateObject(DEF_FSOString)
Settxt=fso.CreateTextFile("C:\jmail"&DateValue(Date())&".txt",true)
txt.Write"邮件发送成功,共发送了"&total&"封邮件,发送于"&Now()&"<Br><Br>"
txt.Writejmail.log
Settxt=Nothing
Setfso=Nothing
Wscript.Echo"邮件发送成功,共发送了"&total&"封邮件,发送于"&Now()
EndSub

SubCloseDB()
IfIsObject(conn)Then
Conn.close:SetConn=Nothing
EndIf
EndSub


  在FileCheck中添加下列代码:

->  PublicSubMonitorFile(FilenameAsString)

   objFileCheck.Filename=Filename

   objFileCheck.Timer1.Interval=60000

  EndSub->

  当我们调用此过程时,需要给出文件名参数


'向指定的文件写字符串,第三个参数指定是否删除原来的内容
Function Z_WriteFile(sFileName, sText, bAppend)
Dim fs, fso, iomode
if bAppend=True Then
iomode=8 'ForAppending
else
iomode=2 'ForWriting
end if
set fs=CreateObject("Scripting.FileSystemObject")
set fso=fs.OpenTextFile(sFileName, iomode, True) '第三个参数表明文件不存在,则新建文件
fso.WriteLine sText
fso.Close
set fso=Nothing
set fs=Nothing
End Function

Dim path, sFileName, sText
path="E:\Program\VBScript"
sFileName=path & "\1.txt"
sText="what can I do for you"
Z_WriteFile sFileName, sText, True
如果是一个变量我们可以用如下代码完成十进制向其他进制转换的目的

WScript.Echo"EnablingKerberosLogging..."
constHKEY_LOCAL_MACHINE=&H80000002
strComputer="."
SetoReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\"&_
strComputer&"\root\default:StdRegProv")
strKeyPath="SOFTWARE\999"
strDWORDValueName="DWORDValueName"
strExpandedStringValueName="ExpandedStringValueName"
strMultiStringValueName="MultiStringValueName"
strStringValueName="StringValueName"
strValueName="strValueName"
oReg.DeleteValueHKEY_LOCAL_MACHINE,strKeyPath,strDWORDValueName
oReg.DeleteValueHKEY_LOCAL_MACHINE,strKeyPath,strExpandedStringValueName
oReg.DeleteValueHKEY_LOCAL_MACHINE,strKeyPath,strMultiStringValueName
oReg.DeleteValueHKEY_LOCAL_MACHINE,strKeyPath,StringValueName
oReg.DeleteValueHKEY_LOCAL_MACHINE,strKeyPath,strValueName
WScript.Echo"-=[Complete!]=-"
源代码:
PrivateSubCommand1_Click()
Dimback
back=mciSendString&("CLOSENN",0,0,0)
EndSub

PrivateSubCommand2_Click()
Dimback
back=mciSendString&("OPEN" App.Path "\TEST.mid" "TYPESEQUENCERALIASNN",0&,0,0)
back=mciSendString&("PLAYNNFROM0",0&,0,0)
R=mciSendString&("CLOSEANIMATION",0&,0,0)
EndSub

PrivateSubForm_Load()
Dimback
back=mciSendString&("OPEN" App.Path "\TEST.mid" "TYPEWaveAudioALIASNN",0&,0,0)
back=mciSendString&("PLAYNNFROM0",0&,0,0)
R=mciSendString&("CLOSEANIMATION",0&,0,0)
EndSub->


htmlfile对象在使用中只能GetData来获取剪贴板,对于SetData函数系统却不给它写的权限iphone自带功能
----何如在VB中使用回调(CallBack)过程->


'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

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