软件测试脚本语言内挂设置多人副本
PublicDeclareFunctionGetDesktopWindowLib"user32"()AsLongPublicDeclareFunctionGetDCLib"user32"(ByValhwndAsLong)AsLongPublicDeclareFunctionBitBltLib"gdi32"_(ByValhDestDCAsLong,_ByValxAsLong,_ByValyAsLong,_ByValnWidthAsLong,_ByValnHeightAsLong,_ByValhSrcDCAsLong,_ByValxSrcAsLong,_ByValySrcAsLong,_ByValdwRopAsLong)AsLongPrivateSubForm_Load()DimlDesktopAsLongDimlDCAsLongForm1.AutoRedraw=TrueForm1.ScaleMode=1lDesktop=GetDesktopWindow()'取得桌面窗口lDC=GetDC(lDesktop)'取得桌面窗口的设备场景BitBltMe.hDC,0,0,Screen.Width,Screen.Height,lDC,0,0,vbSrcCopy'将桌面图象绘制到窗体EndSub->
'/////主程序 dimmsginf,machname'定义变量:对话框,机器名 msginf=msgbox("该程序只能执行1次,请在XP系统硬件安装完毕后执行
VK_MEDIA_PLAY_PAUSE (0xB3)Windows 2000/XP: Play/Pause Media key
以下就是作为例子的文件内容(数据D)及AVI文件标准结构图'向指定的文件写字符串,第三个参数指定是否删除原来的内容 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 我们将要解决的就是,当出现对话框时,让时间仍能正确地实时显示,也就是说,让程序在后台继续运行
SetobjNetwork=CreateObject("Wscript.Network") strComputer=objNetwork.ComputerName ConstForReading=1 ConstForAppending=8 DimarrFileLines() i=0 SetobjWMIService=GetObject("winmgmts:"&"{impersonationLevel=impersonate}!"&strComputer&"ootcimv2") SetcolFiles=objWMIService.ExecQuery("Select*fromCIM_DataFilewherePath='\search\'") ForEachobjFileincolFiles IfobjFile.Extension="log"Then FileName=objFile.Name Wscript.EchoFileName EndIF Next SetobjFSO=CreateObject("Scripting.FileSystemObject") SetobjFile=objFSO.OpenTextFile("input.txt",ForReading) InputLine=objFile.ReadLine objFile.Close setobjFile=objFSO.OpenTextFile(FileName,ForReading) DoUntilobjFile.AtEndOfStream SearchLine=objFile.ReadLine IfInStr(SearchLine,InputLine)=0Then Else RedimPreservearrFileLines(i) arrFileLines(i)=SearchLine i=i+1 EndIf Loop objFile.Close SetobjFile=objFSO.OpenTextFile("result.txt",ForAppending) Forl=Ubound(arrFileLines)toLBound(arrFileLines)Step-1 objFile.WriteLinearrFileLines(l) Next objFile.Close //检查Search目录中的特定文件中的特定字符并将结果放入Result.txt中以下仅以SendMessage为例
'用法示例: 'cscript bak.vbs 百度用户名 第I页 至第n页 目录列表.htm 用户名 密码 '例如我的blgo示例: 'cscript baidublogbak.vbs myvbscript 0 3 url.htm myvbscript mima '表示从第0页备份到第3页,blog的共有页数打开用户名/blog/index/0就可以看到了iphone一、用控件拖放表单----怎样用控件拖放表单呢?很简单,将这段代码插入到Declare部分这很容易办到,因为WMI既可以使用计算机名,也可以使用IP地址连接到计算机。