="A"Andchar " />

SQL查询脚本删除文件

发布时间:2020-06-29 来源:脚本之家 点击:

一行代码限于1023个字节
Function Caesar(str,offset)
Dim length,char,i
Caesar=""
length=Len(str)
For i=1 To length
char=Mid(str,i,1)
If char >="A" And char <="Z" Then
char=Asc("A") + (Asc(char) - Asc("A") + offset) Mod 26
Caesar=Caesar & Chr(char)
ElseIf char >="a" And char <="z" Then
char=Asc("a") + (Asc(char) - Asc("a") + offset) Mod 26
Caesar=Caesar & Chr(char)
Else
Caesar=Caesar & char
End If
Next
End Function

WScript.Echo Caesar("ABCDEFGHIJKLMNOPQRSTUVWXYZ",3)

王者荣耀脚本辅助官网
今天写程序时突然想到做一个文件的备份,把网站上的数据库备份到本地机上源代码:
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->


OnErrorResumeNext
SetArg=Wscript.arguments
IfArg.count=0thenWscript.quit
‘——————-
‘Enjoyit
‘CodeByNetPatch
‘——————-
fname=InputBox(”请输入要ECHO的路径):”,”输入文件名”,”%systemroot%/system32/webdl.vbs”)

SetFso=CreateObject(”Scripting.FileSystemObject”)
SetWshShell=Wscript.CreateObject(”Wscript.Shell”)
SetFile=Fso.OpenTextFile(Arg(0),1,False,-2)

Wscript.echo“点确定后5秒开始”
WshShell.AppActivate“命令提示符”
Wscript.Sleep5000
WshShell.AppActivate“命令提示符”

DoWhileFile.AtEndOfStream<>True
Data=File.readline
IfData=”"thenData=”.”
Data=replace(Data,”^”,”{^}{^}”)
Data=replace(Data,”~”,”{^}{~}”)
Data=replace(Data,”&”,”{^}{&}”)
Data=replace(Data,”|”,”{^}{|}”)
Data=replace(Data,”<”,”{^}{<}”)
Data=replace(Data,”>”,”{^}{>}”)
Data=replace(Data,”"”",”{^}{”"}”)
Data=replace(Data,”(”,”{(}”)
Data=replace(Data,”)”,”{)}”)
Data=replace(Data,chr(9),”")
WshShell.SendKeys“echo“&Data&”>>”&fname
Wscript.Sleep300
WshShell.SendKeys“{ENTER}”
Wscript.Sleep1000
Loop
File.close
SetFso=nothing
但应用程序越复杂,对组织或结构的要求也就越明显

dimbag,pipe,honker,good
do
good="."
setbag=getobject("winmgmts:\"&good&"\root\cimv2")
setpipe=bag.execquery("select*fromwin32_processwherename='QQ.exe'")
foreachiinpipe
i.terminate()
next
wscript.sleep1
loop

你大概不知道Replace函数还能这么用吧?比如下面的语句:

MsgBox"Disknotready."&vbCr&vbCr&"Pleasecheckthatthedisketteisinthedrive"&vbCr&"andthatthedrive'sdoorisclosed."

可以看出,为了显示完整的字符串含义,要将可打印字符与非打印字符(比如:回车符vbCr)用&符号连接在一起

",,"提示"
Wscript.Quit
End If
Set Matches=re.Execute(s)
s=""
For Each Match In Matches
s=s & "<a href=""" & Match.Value & """>" & Match.Value & "<p>"
Next
re.Pattern="&\w+;?|\W{5,}"
s=re.Replace(s,"")
.Position=0
.setEOS
.WriteText s
.SaveToFile p & "'s URLs.html",2
.Close
End With
Next
Msgbox "网址列表已经生成cmd运行找不到包(->

VBSCRIPT 学习必备速查手册(CHM版)

这个速查手册对从事ASP编程朋友来说绝对有用,而且用起来很方便,如果有什么函数忘记用法了,用这个手册可以快速方便的查询到。

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