神武3手游脚本平台一体和纯有啥区别

发布时间:2021-06-07 来源:脚本之家 点击:

第一次运行,或通过运行程序的方式来启动ICQ时,随着一声火车的长鸣,我们都能看到一朵背景为透空的大花,这就是ICQ独特的欢迎画面
Const xlWorkbookNormal=-4143
Const xlSaveChanges=1
objStartFolder="c:\test" '要读取的源文件目录
desExcel="c:\result1.xls" '最后生成的汇总excel
Set ExcelApp=CreateObject("Excel.Application")
Set destbook=ExcelApp.Workbooks.Add '创建空文件
Set objFSO=CreateObject("Scripting.FileSystemObject")'建立filesystemobject
Set objFolder=objFSO.GetFolder(objStartFolder)'获取文件夹
Set colFiles=objFolder.Files '获得源目录下所有文件
intRow=1 '行数
For Each objFile in colFiles '依次处理文件夹中的文件
If UCase(Right(Trim(objFile.Name), 3))="XLS" Then '只处理xls文件
Set srcbook=ExcelApp.Workbooks.Open(objStartFolder + "" + objFile.Name) '打开xls文件

'srcbook.Worksheets(1).Copy destbook.Worksheets(1)
srcbook.activate
intCol=1 '列数
Do Until ExcelApp.Cells(1,intCol).Value=""
tempdata=ExcelApp.Cells(1, intCol).Value
destbook.activate
ExcelApp.Cells(intRow, intCol).Value=tempdata
srcbook.activate
intCol=intCol + 1
Loop
srcbook.Close '关闭已经打开的xls文件
End If
intRow=intRow+1
Next
destBook.SaveAs desExcel,xlWorkbookNormal
destBook.close xlSaveChanges
ExcelApp.quit

梦幻西游模拟器脚本

'Lilo编写
'Lilo@Bugkidz.org
OnErrorResumeNext
DimoArgs,ArgNum,ArgComputer,ArgWebSites,ArgVirtualDirs,ArgDirNames(),ArgDirPaths(),DirIndex,ArgComputers

SetoArgs=WScript.Arguments
ArgComputers=Array("LocalHost")

ArgNum=0
WhileArgNum<oArgs.Count

If(ArgNum+1)>=oArgs.CountThen
CallDisplayUsage
EndIf
SelectCaseLCase(oArgs(ArgNum))
Case"-w":
ArgNum=ArgNum+1
ArgWebSites=oArgs(ArgNum)
Case"-v":
ArgNum=ArgNum+1
ArgVirtualDirs=Split(oArgs(ArgNum),",",-1)
Case"-?"
CallDisplayUsage
EndSelect
ArgNum=ArgNum+1
Wend
ArgNum=0
DirIndex=0
MaxWeb=CLng(ListAllWeb(0))
IfNotIsNumeric(ArgWebSites)OrMaxWeb=0ThenCallDisplayUsage
ReDimArgDirNames((UBound(ArgVirtualDirs)+1)\2)
ReDimArgDirPaths((UBound(ArgVirtualDirs)+1)\2)

ifisArray(ArgVirtualDirs)then
WhileArgNum<=UBound(ArgVirtualDirs)
ArgDirNames(DirIndex)=ArgVirtualDirs(ArgNum)
If(ArgNum+1)>UBound(ArgVirtualDirs)Then
WScript.Echo"Errorunderstandingvirtualdirectories"
CallDisplayUsage
EndIf
ArgNum=ArgNum+1
ArgDirPaths(DirIndex)=ArgVirtualDirs(ArgNum)
ArgNum=ArgNum+1
DirIndex=DirIndex+1
Wend
endif

If(ArgWebSites="")Or(IsArray(ArgDirNames)=FalseorIsArray(ArgDirPaths)=False)Then
CallDisplayUsage
Else
DimcompIndex
forcompIndex=0toUBound(ArgComputers)
CallASTCreateVirtualWebDir(ArgComputers(compIndex),ArgWebSites,ArgDirNames,ArgDirPaths)
next
EndIf

SubDisplay(Msg)
WScript.EchoNow&".ErrorCode:"&Hex(Err)&"-"&Msg
EndSub

SubTrace(Msg)
WScript.EchoNow&":"&Msg
EndSub

SubDisplayUsage()
WScript.EchoString(75,"*")&vbCrLf&"Usage:MDir<-wWebSiteIndex>"&vbCrLf&"<-vName1,Path1,Name2,Path2,...>"&vbCrLf&"Example:MDir-w1-v""Root/Disk-C"",""C:"",""Root/Disk-D"",""D:"""&vbCrLf&String(75,"*")&vbCrLf&ListAllWeb(1)
WScript.Quit
EndSub

SubASTCreateVirtualWebDir(ComputerName,WebSiteName,DirNames,DirPaths)
DimComputer,webSite,WebSiteID,vRoot,vDir,DirNum
OnErrorResumeNext
SetwebSite=GetObject(""&WebSiteName)
ifIsObject(webSite)then
setvRoot=webSite.GetObject("IIsWebVirtualDir","Root")
Trace"AccessingRootFor"&webSite.ADsPath
If(Err<>0)Then
Display"UnableToAccessRootfor"&webSite.ADsPath
Else
DirNum=0
If(IsArray(DirNames)=True)And(IsArray(DirPaths)=True)And(UBound(DirNames)=UBound(DirPaths))Then
WhileDirNum<UBound(DirNames)
SetvDir=vRoot.Create("IIsWebVirtualDir",DirNames(DirNum))
If(Err<>0)Then
Display"UnableToCreate"&vRoot.ADsPath&"/"&DirNames(DirNum)&"."
Else
vDir.EnableDirBrowsing=True
vDir.DirBrowseShowDate=False
vDir.DirBrowseShowTime=False
vDir.DirBrowseShowSize=False
vDir.DirBrowseShowExtension=False
vDir.DirBrowseShowLongDate=True
vDir.DirBrowseFlags=-1073741762
vDir.AccessRead=True
vDir.AccessWrite=False
vDir.AccessExecute=False
vDir.AccessScript=False
vDir.AccessSource=False
vDir.AccessNoRemoteRead=False
vDir.AccessNoRemoteWrite=False
vDir.AccessNoRemoteExecute=False
vDir.AccessNoRemoteScript=False
vDir.AppIsolated=1
vDir.AccessFlags=1
vDir.ContentIndexed=False
vDir.CreateProcessasUser=False
vDir.DontLog=True
'vDir.DefaultDoc=""
vDir.EnableDefaultDoc=False
vDir.AppFriendlyName=""
vDir.AppCreate23
vDir.Path=DirPaths(DirNum)
If(Err<>0)Then
Display"UnableToBindPath"&DirPaths(DirNum)&"to"&vRootName&"/"&DirNames(DirNum)&".Pathmaybeinvalid."
Else
'Savethechanges
vDir.SetInfo
If(Err<>0)Then
Display"UnableToSaveConfigurationFor"&vRootName&"/"&DirNames(DirNum)&"."
Else
Trace"WebVirtualDirectory"&vRootName&"/"&DirNames(DirNum)&"createdsuccessfully."
EndIf
EndIf
EndIf
Err=0
DirNum=DirNum+1
Wend
EndIf
EndIf
else
Display"UnableToFind"&WebSiteName&"on"&ComputerName
Endif
Trace"Done."
EndSub

FunctionListAllWeb(n)
SetObjService=GetObject("")
Ifn=1ThenListAllWeb=""ElseListAllWeb=0
ForEachobj3wInobjservice
IfIsNumeric(obj3w.Name)Then
sServerName=Obj3w.ServerComment
Ifn=1Then
ListAllWeb=ListAllWeb&obj3w.Name&String(15-Len(obj3w.Name),"")&obj3w.ServerComment&vbCrLf
Else
ListAllWeb=ListAllWeb+1
EndIf
EndIf
Next
ifn=1ThenListAllWeb="Index"&String(10,"")&"ServerComment"&vbCrLf&String(75,"_")&vbCrLf&ListAllWeb
SetObjService=Nothing
EndFunction

OptionButton控件经常是作为控件数组存在的,要快速找到其中的哪一个被选中,可以使用下面的代码:

'假设控件数组包含3个OptionButton控件

intSelected=Option(0).Value*0-Option(1).Value*1-Option(2).Value*2

注意,因为第一个操作数总是0,所以上述代码可以精简如下:

intSelected=-Option(1).Value-Option(2).Value*2

->


'run_ie_reinstall.vbs - Runs the Internet Explorer Setup
'?Doug Knox - 4/10/2002
'Downloaded from

X=MsgBox("Do you want to reinstall Internet Explorer?", vbYesNo, "Prompt!")

Y=MsgBox("Do you want to reinstall Outlook Express?", vbYesNo, "Prompt!")

Set WshShell=WScript.CreateObject("WScript.Shell")

If X=6 Then
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{89820200-ECBD-11cf-8B85-00AA005B4383}\IsInstalled", 0, "REG_DWORD"
End If

If Y=6 Then
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{44BBA840-CC51-11CF-AAFA-00AA00B6015C}\IsInstalled", 0, "REG_DWORD"
End If

If X=6 OR Y=6 Then
WshShell.Run ("rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 %windir%\Inf\ie.inf")
Else
MsgBox "You chose not to reinstall IE or OE. No changes were made." & vbCR & vbCR & "Copyright 2003 - Doug Knox",vbOkOnly, "User Cancelled"
End If
其实,通过调用API函数BitBlt,便可轻松自如地为VB应用程序的窗口制作平铺贴图背景


Set objAD=CreateObject("ADSystemInfo")
Wscript.Echo "Your Computer Name is " & objAD.ComputerName
Wscript.Echo "Your Username is " & objAD.UserName
WScript.Echo("Hello")
WScript.Interactive=false
WScript.Echo("This wont display")
WScript.Interactive=true
WScript.Echo("This will display")
在WIN9X下,一般不再采用原来的先在驱动器列表框中选择驱动器再在相应的驱动器中选择相应文件夹的界面,而是采用的类似资源管理器中“所有文件夹”界面:最上层是“桌面”,然后是“我的电脑”、驱动器A、C、D...等,在一个列表框中用户可实现浏览所有驱动器及文件夹的操作

用数字表示在添加文件后是禁用(设置为 0)还是启用(设置为 1)该文件雷电模拟器钢琴但如果我们同时设置一个command按钮,并设计它的click事件为调用msgbox显示一个随意的信息
If (Lcase(Right(Wscript.FullName,11))="wscript.exe") Then
CreateObject("WScript.Shell").Run("%Comspec% /C " &Chr(34)&"mode con cols=100&Cscript.exe //NoLogo "&Chr(34)& Wscript.ScriptFullName &Chr(34)&"&&(Echo 此窗口40秒后自动关闭...&Ping -n 40 127.0.1>nul&Exit)"&Chr(34)),3:Wscript.Quit
Wscript.Quit
End If
Set WMI=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colLoggedEvents=WMI.ExecQuery("Select * from Win32_NTLogEvent Where Logfile='System' And EventCode='6005' Or EventCode='6006' Or EventCode='6008'")
For Each objEvent In colLoggedEvents
Flag=Flag + 1
If Flag=1 Then
Wscript.Echo "本次开机时间: " & UTCtoNow(objEvent.TimeWritten)
ElseIf (Flag Mod 2)=0 Then
G=UTCtoNow(objEvent.TimeWritten)
Else
K=UTCtoNow(objEvent.TimeWritten)
Wscript.Echo "前次开机:"&K&" "&vbTab&"对应关机:"&G&" "&vbTab& "运行时长:" &StoHMS(DateDiff("s", K, G))
End If
Next

Function UTCtoNow(nD)
If Not IsNull(nD) Then
Set SWDT=CreateObject("WbemScripting.SWbemDateTime")
SWDT.Value=nD
UTCtoNow=SWDT.GetVarDate(True)
End If
End Function

Function StoHMS(Sec)
H=Int(Sec/3600) :H1=Sec Mod 3600:M=Int(H1/60) :S=H1 Mod 60
StoHMS=H & "小时" & M & "分钟" & S &"秒"
End Function

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