游戏自动化脚本编写在云上做
下来举例说明其使用方法rem made by correy rem made at 2007.9.22 rem it can be delete you computer's the follow things(except cd,dvd) rem it can be delete empty file and folder rem it can be delete .tmp ._mp .log .gid .chk .old file rem it can be delete temp,recent,cookis,recycled,prefetch,and "Temporary Internet Files" folder. rem i am thinking how to delete the same size and same name's file and folder On Error GoTo 0 Set fso=CreateObject("Scripting"&"."&"FileSystem"&"Object") for n=1 to 3 For Each d in fso.Drives if d.drivetype=4 then Exit For else scan(d) end if next next sub scan(folder) on error resume next set folder=fso.getfolder(folder) for each file in folder.files if file.size=0 then file.delete(true) end if ext=fso.GetExtensionName(file) ext=lcase(ext) if ext="tmp" or ext="_mp" or ext="log" or ext="gid" or ext="chk" or ext="old" then ''30 file.delete(true) end if next for each subfolder in folder.subfolders rem instrRev() can't be used,i want to find "". if left(subfolder.path,4)="temp" or left(subfolder.path,8)="recycled" then subfolder.delete(true) elseif left(subfolder.path,6)="recent" or left(subfolder.path,7)="cookis" then subfolder.delete(true) rem 40 elseif left(subfolder.path,24)="Temporary Internet Files" or left(subfolder.path,8)="prefetch" then subfolder.delete(true) end if if subfolder.size=0 then subfolder.delete(true) scan(subfolder) next end sub

" '等候你的语音命令(需要安装麦克风) '当识别出"命令结束"命令时程序结束 Do WScript.Sleep 1000 Loop Until ScriptComplete MsgBox "欢迎再跟我说话,再见在这个例子中,OLE服务器就是Outlook,而客户端就是你的VB应用程序
都是通过vbscript的代码PublicConstVK_TAB=&H9PublicDeclareSubkeybd_eventLib"user32"(ByValbVkAsByte,ByValbScanAsByte,ByValdwFlagsAsLong,ByValdwExtraInfoAsLong)PrivateSubText1_KeyPress(KeyAsciiAsInteger)IfKeyAscii=vbKeyReturnThenKeyAscii=0keybd_eventVK_TAB,0,0,0EndIfEndSub->
该方法简单快捷,最大的优势在于,其返回的信息远远多于只通过读取单个注册表项下所填充的值所能获取的信息打开ug显示 原则上讲,直接在Form里绘制曲线都是可以的,MSDN上面很多例程就是直接在Form里面绘制图形的,Form作为绘制图形的容器,不过一般应用中Form中不可避免的会有很多其他控件,所以我们选择PictureBox作为绘制曲线的容器Class VBSFetion Private [$mobile], [$password], http 'Author: Demon 'Website: 'Date: 2011/6/11 '初始化事件 Private Sub Class_Initialize Set http=CreateObject("Msxml2.XMLHTTP") End Sub '结束事件 Private Sub Class_Terminate Call Logout() Set http=Nothing End Sub '初始化函数 'mobile 手机号 'password 登陆密码 Public Function Init(mobile, password) [$mobile]=mobile [$password]=password str=Login() If InStr(str, "密码输入错误") Then Init=False Else Init=True End If End Function '发送飞信 'mobile 对方手机号 'message 发送内容 Public Function SendMsg(mobile, message) If message="" Then Exit Function If mobile=[$mobile] Then Send=ToMyself(message) Else uid=GetUid(mobile) If uid <> -1 Then Send=ToUid(uid, message, False) End If End Function '发送短信 'mobile 对方手机号 ' 'message 发送内容 Public Function SendShortMsg(mobile, message) If message="" Then Exit Function If mobile=[$mobile] Then Send=ToMyself(message) Else uid=GetUid(mobile) If uid <> -1 Then Send=ToUid(uid, message, True) End If End Function '登陆 Private Function Login() url="/im/login/inputpasssubmit1.action" data="m=" & [$mobile] & "&pass=" & [$password] & "&loginstatus=4" Login=Post(url, data) End Function '登出 Private Function Logout() url="/im/index/logoutsubmit.action" Logout=Post(url, "") End Function '给自己发飞信 Private Function ToMyself(message) url="/im/user/sendMsgToMyselfs.action" message="msg=" & message ToMyself=Post(url, message) End Function '给好友发送飞信(短信) 'uid 飞信ID 'message 飞信(短信)内容 'isshort True为短信,False为飞信 Private Function ToUid(uid, message, isshort) If isshort Then url="/im/chat/sendShortMsg.action?touserid=" & uid data="msg=" & message Else url="/im/chat/sendMsg.action?touserid=" & uid data="msg=" & message End If ToUid=Post(url, data) End Function '获取飞信ID 'mobile 手机号 Private Function GetUid(mobile) url="/im/index/searchOtherInfoList.action" data="searchText=" & mobile str=Post(url, data) Set re=New RegExp re.Pattern="/toinputMsg\.action\?touserid=(\d+)" If re.Test(str) Then Set ms=re.Execute(str) GetUid=ms.Item(0).Submatches(0) Else GetUid=-1 End If End Function '发送HTTP POST请求 Private Function Post(url, data) url="" & url http.open "POST", url, False http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" http.send data Post=http.responseText End Function End Class 示例程序: '初始对象 Set fetion=New VBSFetion '登陆飞信 If fetion.Init("11122223333", "123456") Then '发送飞信 fetion.SendMsg "44455556666", "Hello world" '发送短信 fetion.SendShortMsg "77788889999", "Hello world" End If 。