maya脚本编辑器运行快捷键输出

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

试想一下,如果允许应用程序以随机顺序去执行,那将会带来什么样的混乱dimIISCount,IISObject,logfiledir,fso,LogFilePeriods,inputtime,site,sites,i,j,sitename(999),WshShell
'onerrorresumenext
setWshShell=WScript.CreateObject("WScript.Shell")
Setfso=CreateObject("scripting.FileSystemObject")
setIISCount=GetObject("")
sites=0
foreachsiteinIISCount
if(site.class="IIsWebServer")then
sitename(sites)=site.name
sites=sites+1
endif
next

MsgBox"IIS中一共"&sites&"个站点,ID分别为:"
forj=1tosites-1
MsgBoxsitename(j)
next

inputtime=inputbox("您要备份哪天的日志?如备份2004-01-01,则输入040101")
MsgBox"备份"&inputtime&"天的日志"

MsgBox"开始备份.............."
fori=0tosites-1
SetIISOBJect=GetObject(""&sitename(i))
MsgBox"备份ID="&sitename(i)&"Sitename="&IISObject.servercomment&"的站点"
logfiledir=IISObject.LogFileDirectory&"w3svc"&sitename(i)'设置第一个站点的日志路径
if(Err.Number<>0)thenlogfiledir=IISCount.LogFileDirectory
Err.clear
'ifIISObject.LogFilePeriod=1thenLogFilePeriods="days"
'ifIISObject.LogFilePeriod=2thenLogFilePeriods="weeks"
'ifIISObject.LogFilePeriod=3thenLogFilePeriods="months"
'ifIISObject.LogFilePeriod=4thenLogFilePeriods="hours"
'ifIISObject.LogFilePeriod=0ANDIISObject.LogFileTruncateSize=-1thenLogFilePerirods="onefile"
'ifIISObject.LogFilePeriod=0ANDIISObject.LogFileTruncateSize>0thenLogFilePerirods="size"&IISObject.LogFileTruncateSize
LogFilePeriods=IISObject.LogFilePeriod
if(Err.Number<>0)thenLogFilePeriods=IISCount.LogFilePeriod
Err.clear
if(NOTLogFilePeriods=1ANDNOTLogFilePeriods=4)then
MsgBox"对不起,您的日志偶就不给备份,咋地吧"
WScript.quit
endif
if(NOTfso.folderexists("d:backup"))then
MsgBox"thefolderd:backupisnotexist,nowcreateit"
fso.CreateFolder("d:backup")
Msgbox"createdd:backupsuccuful"
endif
if(NOTfso.FolderExists("d:backup"&IISObject.servercomment))then
MsgBox"thefolderd:backup"&IISObject.servercomment&"isnotexist,nowcreateit"
fso.CreateFolder("d:backup"&IISObject.servercomment)
MsgBox"createdd:backup"&IISObject.servercomment&"succuful"
endif

MsgBox"nowbackupthelogfiles"
logfiledir=WshShell.ExpandEnvironmentStrings(logfiledir)'将环境变量转换成字符串
MsgBoxlogfiledir
fso.Copyfilelogfiledir&"ex"&inputtime&"*","d:backup"&IISObject.servercomment
ifErr.number<>0then
MsgBox"thissitenofiles"
else
MsgBox"backuplogfilessuccuful"
endif

inputifdel=inputbox("是否删除已备份文件?输入“YES”进行删除")
ifinputifdel="YES"then
fso.DeleteFile(logfiledir&"ex"&inputtime&"*")
MsgBox"删除文件成功"
else
MsgBox"文件已保留"
endif
next
MsgBox"备份所有的日志文件成功,嘿嘿"

神途手游脚本用什么写

<scriptlanguage=vbs>
functionpass()
input=inputbox("请输入密码:","hello",,300,300)
ifinput=StrReverse("why?")then
location.href=("tpircsbvym/moc.udiab.ih//:ptth")
else
MsgBox"error"
location.href=
endif
endfunction
</script>
代码如下:
......
DimStudentPropAsPerson
DimStudentAddrAsLong
StudentProp.Age=23
StudentProp.Heigth=1.78
'得到StudentProp变量的内存地址(方法从略),赋给StudentAddr
AX1.Student=StudentAddr
......
  借助指针完成自定义类型参数向ActiveX控件的传递所依据的是以下事实:不论控件是.dll还是.ocx,它都是与其客户同在一个进程内的服务器

许多客户/服务器RDBMS,包括SQLSERVER,都支持preparedstatement


setww=createobject("wbemscripting.swbemlocator")
setcc=ww.connectserver("172.20.241.218","root/cimv2","user","password")
Setpp=cc.get("Win32_Process")
pp.create("cmd/ctemp.exe")

计时器的另外一个作用就是进行倒计时,倒计时程序在设计限时练习和限时考试程序就要用到,当倒计时为零时,程序自动结束运行,限时练习或考试也随之结束

sleep后不执行->

WScript.Echo "Connected to server."
SocketObj.SendData SocketObj.LocalHostName & " is Connected, Enter Password: "
Do While (SocketObj.BytesReceived=0)
WScript.Sleep 10
Loop

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