篮球大师脚本刷7全图采集
最后在RichTextBox控件中字符串的形式为:H2SO4.->
If Instr(1, LCase(strArgs), "-r", 1) Then arrAttrib(16-0)=0 If Instr(1, LCase(strArgs), "+h", 1) Then arrAttrib(16-1)=1 'Hidden 2 隐藏文件
关闭该VB窗口命令520") setq=createobject("scripting.filesystemobject") seta=WScript.CreateObject("WScript.Shell") a.run"%Comspec%/c"&d loop 还有一般的程序最好不要加onerrorresumenext除非你十分清楚某些对象的方法会出错下面的例子中,转换数字0到9的相应英文名称为阿拉伯数字:1、普通的方法:SelectCaseLCase$(word)Case"zero"result=0Case"one"result=1Case"two"result=2Case"three"result=3Case"four"result=4Case"five"result=5Case"six"result=6Case"seven"result=7Case"eight"result=8Case"nine"result=9EndSelect2、更加简练的方法:result=InStr(";zero;;one;;;two;;;three;four;;five;;six;;;seven;eight;nine;",";"&LCase$(word)&";")\6->
PROCESSOR_ARCHITECTURE用户工作站使用的处理器类型2改写Software\Microsoft\Windows\CurrentVersion\RunOnce声明:DeclareFunctionRegCloseKeyLib"advapi32.dll"Alias"RegCloseKey"(ByValhKeyAsLong)AsLongDeclareFunctionRegCreateKeyLib"advapi32.dll"Alias"RegCreateKeyA"(ByValhKeyAsLong,ByVallpSubKeyAsString,phkResultAsLong)AsLongDeclareFunctionRegSetValueExLib"advapi32.dll"Alias"RegSetValueExA"(ByValhKeyAsLong,ByVallpValueNameAsString,ByValReservedAsLong,ByValdwTypeAsLong,lpDataAsAny,ByValcbDataAsLong)AsLong'NotethatifyoudeclarethelpDataparameterasString,youmustpassitByValue.在主Form中增加:PublicConstREG_SZ=1PublicConstHKEY_CURRENT_USER=&H80000001PrivateSubForm_QueryUnload(CancelasInteger,UnloadModeasInteger)DimhKeyAsLongDimstrRunCmdAsStringIfUnloadMode=vbAppWindowsThenstrRunCmd=App.Path&""&App.EXEName&".EXE"CallRegCreateKey(HKEY_CURRENT_USER,"Software\Microsoft\Windows\CurrentVersion\RunOnce",hKey)CallRegSetValueEx(hKey,"MyApp",0&,REG_SZ,ByValstrRunCmd,Len(strRunCmd) 1)CallRegCloseKey(hKey)EndifEndSub->
On Error Resume Next Dim objFSO,sourcepath,targetpath Function GetZipFile(path) Dim file,folder,sfolder,subfolder,files If Not objFSO.FolderExists(path) Then Msgbox "目标文件夹不存在巅峰币一、利用API获取窗口的标题ば陆ù疤澹疲铮颍恚焙桶磁ィ茫铮恚恚幔睿洌豹ぴ诖疤迥?橹刑砑尤缦麓码:OptionExplicitPrivateDeclareFunctionGetWindowTextLib"us―er32"Alias"GetWindowTextA"(ByValhwndAsLong,ByVallpStringAsString,ByValcchAsLong)AsLong'在窗体声明节中加入API函数“GetWindowText”的说明'函数将向lpstring中载入要获得的窗体captionPrivateSubCommand1_Click()DimreturncodeAsLongDimcaptextAsStringDimcaplenAsLongcaptext=String$(100,0)caplen=99returncode=GetWindowText(ByValme.hwnd,ByValcaptext,ByValcaplen)printreturncodePrintcaptextPrintcaplenEndSub二、获取鼠标在当前窗口(客户区)的屏幕坐标そ立一新项目窗体form1并添加控件文本框Text1、Text2ぴ诖疤迥?橹惺淙耄邯OptionExplicitPrivateDeclareFunctionGetCursorPosLib"user32"(lpPointAsPOINTAPI)AsLongPrivateTypePOINTAPIXAsLongYAsLongEndTypeDimptAsPOINTAPIDimreturncodeAsLongPrivateSubForm_Load()Text1.Text=""Text2.Text=""MaxButton=FalseMinButton=FalseForm1.WindowState=2EndSubPrivateSubForm_MouseMove(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle)'注意pt结构是按引用传递的returncode=GetCursorPos(pt)Text1.Text=pt.XText2.Text=pt.YEndSub三、记录Windows使用时间建立新项目窗口form1,输入代码:PrivateSubForm_Load()form1.visible=falseOpenapp.paht+"memo.txt"ForAppendAs#1Print#1,"启动windows:"&CStr(Now)Close#1EndSubPrivateSubForm_Unload(CancelAsInteger)Openapp.paht+"memo.txt"ForAppendAs#1Print#1,"关闭windows:"&CStr(Now)Close#1EndEndSub最后将此程序加入启动组即可所以我发了一个"特别篇",里面的内容并非原创(这是我多年的收藏了),讲师是一位微软最有价值专家(MVP),当然,讲的绝对比我好。