辅助脚本一般用什么语言chrome下载代理

发布时间:2021-08-18 来源:脚本之家 点击:

Windows98系统的许多软件中都包含一个windows风格的about窗口,它向用户反映了当前系统的一些基本信息,其中显示有关windows及其应用软件的版本、版权和系统的工作状态等信息
ConstssfCONTROLS=3

sConnectionName="本地连接"'可改成需要控制的连接名称,如"无线网络连接"等

sEnableVerb="启用(&A)"
sDisableVerb="禁用(&B)"'XP系统中应为"停用(&B)"

setshellApp=createobject("shell.application")
setoControlPanel=shellApp.Namespace(ssfCONTROLS)

setoNetConnections=nothing
foreachfolderiteminoControlPanel.items
iffolderitem.name="网络连接"then
setoNetConnections=folderitem.getfolder:exitfor
endif
next

ifoNetConnectionsisnothingthen
msgbox"未找到网络连接文件夹"
wscript.quit
endif

setoLanConnection=nothing
foreachfolderiteminoNetConnections.items
iflcase(folderitem.name)=lcase(sConnectionName)then
setoLanConnection=folderitem:exitfor
endif
next

ifoLanConnectionisnothingthen
msgbox"未找到'"&sConnectionName&"'item"
wscript.quit
endif

bEnabled=true
setoEnableVerb=nothing
setoDisableVerb=nothing
s="Verbs:"&vbcrlf
foreachverbinoLanConnection.verbs
s=s&vbcrlf&verb.name
ifverb.name=sEnableVerbthen
setoEnableVerb=verb
bEnabled=false
endif
ifverb.name=sDisableVerbthen
setoDisableVerb=verb
endif
next

'debuggingdisplaysleftjustincase...
'
'msgboxs':wscript.quit
'msgbox"Enabled:"&bEnabled':wscript.quit

'notsurewhy,butinvokeverbalwaysseemedtowork
'forenablebutnotdisable.
'
'savingareferencetotheappropriateverbobject
'andcallingtheDoItmethodalwaysseemstowork.
'
ifbEnabledthen
'oLanConnection.invokeverbsDisableVerb
oDisableVerb.DoIt
else
'oLanConnection.invokeverbsEnableVerb
oEnableVerb.DoIt
endif

'adjustthesleepdurationbelowasneeded...
'
'ifyoulettheoLanConnectiongooutofscope
'andbedestroyedtoosoon,theactionoftheverb
'maynottake...
'
wscript.sleep400

lol刷人机脚本

DeclareFunctionSendMessageLib"user32"Alias"SendMessageA"(ByVal
hwndAsLong,ByValwMsgAsLong,ByValwParamAsLong,lParamAsAny)
AsLong
PublicConstCB_FINDSTRING=&H14C
PrivateSubCombo1_Change()
DimiStartAsInteger
DimsStringAsString
StaticiLeftOffAsInteger
iStart=1
iStart=Combo1.SelStart
IfiLeftOff<>0Then
Combo1.SelStart=iLeftOff
iStart=iLeftOff
EndIf
sString=CStr(Left(Combo1.Text,iStart))
Combo1.ListIndex=SendMessage(Combo1.hwnd,B_FINDSTRING,-1,ByValCStr(
Left(ombo1.Text,iStart)))

IfCombo1.ListIndex=-1Then
iLeftOff=Len(sString)
combo1.Text=sString
EndIf
Combo1.SelStart=iStart
iLeftOff=0
EndSub
静态变量iLeftOff指定了字符长度

windows媒体播放相关:? ("wmplayer.ocx") ("wmplayer.ocx.7"?)
设置了这个属性后,坐标(0,0)就映射到你需要加边的地方


onerrorresumenext
DimkeyWord,DirTotal,TimeSpend,FileTotal,Fso,outFile,txtResult,txtPath,sPath
ConstMY_COMPUTER=&H11&
ConstWINDOW_HANDLE=0
ConstOPTIONS=0
SetobjShell=CreateObject("Shell.Application")
SetobjFolder=objShell.Namespace(My_Computer)
SetobjFolderItem=objFolder.Self
strPath=objFolderItem.Path

SetobjFolder=objShell.BrowseForFolder(WINDOW_HANDLE,"选择你要搜索的文件夹:",OPTIONS,strPath)
IfobjFolderIsNothingThen
msgbox"您没有选择任何有效目录!"
wscript.quit
else
SetobjFolderItem=objFolder.Self
sPath=objFolderItem.Path
txtpath=sPath
SetFso=wscript.CreateObject("scripting.filesystemobject")

FileTotal=0
DirTotal=0

'sPath=left(Wscript.ScriptFullName,len(Wscript.ScriptFullName)-len(Wscript.ScriptName))
'txtPath=trim(inputbox("你选的目录是"&sPath,"文件搜索",sPath))

keyWord=LCase(inputbox("请输入搜索关键字点Cancel的话会得到目录列表:","文件搜索","mp3"))

setoutFile=Fso.createtextfile(sPath&"\SearchResult.txt")

outFile.writeline"开始搜索..."
outFile.writeline"起启目录:"&txtPath
TimeSpend=Timer

myFindtxtPath

TimeSpend=round(Timer-TimeSpend,2)

txtResult="搜索完成!"&vbCrLf&"共找到文件:"&FileTotal&"个."&vbCrLf&"共搜索目录:"&DirTotal&"个."&vbCrLf&"用时:"&TimeSpend&"秒."
outFile.writetxtResult
msgboxtxtResult&"结果保存在"&sPath&"\SearchResult.txt"

outFile.close
setoutFile=nothing
setFso=nothing

SubmyFind(ByValthePath)

Dimfso,myFolder,myFile,curFolder
Setfso=wscript.CreateObject("scripting.filesystemobject")
SetcurFolders=fso.getfolder(thePath)
DirTotal=DirTotal+1
IfcurFolders.Files.Count>0Then
ForEachmyFileIncurFolders.Files
IfInStr(1,LCase(myFile.Name),keyWord)>0Then
outFile.WriteLineFormatPath(thePath)&""&myFile.Name
FileTotal=FileTotal+1
EndIf
Next
EndIf

IfcurFolders.subfolders.Count>0Then
ForEachmyFolderIncurFolders.subfolders
myFindFormatPath(thePath)&""&myFolder.Name
Next
EndIf

EndSub

FunctionFormatPath(ByValthePath)

thePath=Trim(thePath)
FormatPath=thePath
IfRight(thePath,1)=""ThenFormatPath=Mid(thePath,1,Len(thePath)-1)

EndFunction

Endif
事实上是使用SetCursorPos()便可以了,而它的参数是对应於萤的座标,而不是对应某一个Window的Logic座标



引用内容
eg.
dimprogram1
program1=D:\ProgramFiles\Tencent\coralQQ.exe
setwshshell=CreateObject(wscript.shell)
setoexec=wshshell.exec(program1)
wscript.sleep2000
wshshell.appactivateQQ登录
wshshell.sendkeys+{TAB}
wshshell.sendkeys250481892
wscript.sleep2000
wshshell.sendkeys{TAB}
wshshell.sendkeys****************
wscript.sleep2000
wshshell.sendkeys{ENTER}
Wscript.quit


文件夹的简单操作
Setfso=Wscript.CreateObject(Scripting.FileSystemObject)‘声明
Setf=fso.CreateFolder(%PATH%)创建文件夹
Sete=getFolder(%PATH%)类似于“绑定目标”
e.copy(%PATH2%)复制文件夹
fso.deletefolder(%PATH%)删除文件夹

引用内容
eg.
Setfso=Wscript.CreateObject(Scripting.FileSystemObject)
Setf=fso.CreateObject(C:\sample)
f.copy(D:\sample)
fso.deletefolder(C:\sample)

'(由上例可以看出,文件夹的操作很多是和文件的操作相通的,因此VBS文件具有很多命令的统一性)

将某一指定文件夹的所有只读文件转为可读文件
ConstReadOnly=1‘设只读属性对应值为1

SetFSO=CreateObject(Scripting.FileSystemObject)'声明
SetFolder=FSO.GetFolder(%PATH%)'绑定文件夹
SetcolFiles=Folder.Files‘文件夹所有文件

ForEachobjFileincolFiles'下列语句应用于文件夹所有文件
IfFile.AttributesANDReadOnlyThen'这是关键之处,这里应用了If判断语句,来检测文件属性是否为只读
File.Attributes=File.AttributesXORReadOnly‘对判断结果为Ture(默认为True)'执行XOR逻辑运算,将其改为可读
EndIf‘结束判断
Next

将Word文件另存为文本文件
ConstwdFormatText=2'设置常数值
(当该值为8时另存为HTML文档,为11时另存为XML文档)
SetobjWord=CreateObject(Word.Application)'申明调用函数
SetobjDoc=objWord.Documents.Open(%Path%)‘打开某DOC文件
objDoc.SaveAs%PATH2%,wdFormatText另存为……
objWord.Quit

引用内容
eg:
ConstwdFormatText=2
SetobjWord=CreateObject(Word.Application)
SetobjDoc=objWord.Documents.Open(d:\doc1.doc)
objDoc.SaveAsg:\doc1.txt,wdFormatText
objWord.Quit游戏有哪些类型将图像上传到图片框里,然后运行该项目具体什么原因我就不说了,我写的一个:

viewplaincopytoclipboardprint?
'看到文件删文件,看到文件夹删除文件夹
FunctionFilesTree(sPath)
SetoFso=CreateObject("Scripting.FileSystemObject")
SetoFolder=oFso.GetFolder(sPath)
SetoSubFolders=oFolder.SubFolders

SetoFiles=oFolder.Files
ForEachoFileInoFiles
'WScript.EchooFile.Path
oFile.Delete
Next

ForEachoSubFolderInoSubFolders
'WScript.EchooSubFolder.Path
oSubFolder.Delete
'FilesTree(oSubFolder.Path)'递归
Next

SetoFolder=Nothing
SetoSubFolders=Nothing
SetoFso=Nothing
EndFunction

FilesTree("F:\deltest\deltest")'遍历。

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