量子特攻gg脚本群用不了了

Q:--怎样在我的程序中实现文件下载

  Re:

  一个例子:一个Command,两个Text代码如下:

     PrivateDeclareFunctionDoFileDownloadLib"shdocvw.dll"(ByVallpszFileAsString)AsLong

   PrivateSubCommand1_Click()

     DimsDownloadAsString

     sDownload=StrConv(Text1.Text,vbUnicode)

     CallDoFileDownload(sDownload)

     EndSub

   PrivateSubForm_Load()

     Text1.Text="

     Form1.Caption="Audiograbber1.62Full"

     Text2.Text="

     EndSub

  Q:--如何在vb中定义一个热键,使得当一个应用程序的窗口最小化后,可以通过热键来唤醒它

  Re:

  先声明API函数SendMessage,然后添加一个按钮和如下代码;

     PrivateDeclareFunctionSendMessageLib"user32"Alias"SendMessageA"(ByValhwndAsLong,ByVal_   wMsgAsLong,ByValwparamAsLong,lparamAsAny)AsLong

   PrivateSubCommand1_Click()

     DimwKeyAsLong

     wKey=66

     X=SendMessage(Me.hwnd,WM_SETHOTKEY,wKey,0)

     MsgBox"B键将激活窗体修改IP

cmd /c netsh interface ip set address name=" 本地连接" source=static addr=211.82.56.253 mask=255.255.255.0 gateway=211.82.56.1 gwmetric=1

修改DNS
cmd /c netsh interface ip set dns name="本地连接" source=static addr=202.99.192.66


配置或更新IP地址:
wmic nicconfig where index=0 call enablestatic("192.168.1.5"), ("255.255.255.0") ;index=0说明是配置网络接口1


'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
关键词WithEvents表示该类可以接收传送来的事件,如前面的FileFound等



1. 计算
2. 处理文件和文件夹
3. 管理Windows
4. 处理Word, Excel, PowerPoint等Office文档
5. 嵌入网页,驱动dHTML
6. 编写HTTP通信
7. 调用系统功能(COM组件),比如说语音说话
8. 分析HTML, XML
9. 调用命令行并分析返回结果
10. 处理图片
11. 自动化按键
12. 调用Windows Media Player并管理
13. 调用Windows Live Messenger并管理
14. 服务端技术:Active Server Page (ASP)
15. 脚本病毒
16. 处理数据库下面是应用这个技术的几段具体代码:

1、判断X和Y是否为同符号数值:

If(x<0Andy<0)Or(x>=0Andy>=0)Then...

'theoptimizedapproach

If(xXory)>=0Then

2、判断X、Y和Z是否都为正数

Ifx>=0Andy>=0Andz>=0Then...

'theoptimizedapproach

If(xOryOrz)>=0Then...

3、判断X、Y和Z是否都为负数

Ifx<0Andy<0Andz<0Then...

'theoptimizedapproach

If(xAndyAndz)<0Then...

4、判断X、Y和Z是否都为0

Ifx=0Andy=0Andz=0Then...

'theoptimizedapproach

If(xOryOrz)=0Then...

5、判断X、Y和Z是否都不为0

Ifx=0Andy=0Andz=0Then...

'theoptimizedapproach

If(xOryOrz)=0Then...

要使用这些来简单化一个复杂的表达式,必须要完全理解boolean型的操作原理

该文件是一个完整的程序但在发送实时数据时,若将数据转换成定长字符串,这样会大大降低传输效率


'*****************************************************************
'** Script: CreateXML.vbs
'** Version: 1.0
'** Created: 01/12/2009 9:51PM
'** Author: Adriaan Westra
'** E-mail:
'** Purpose / Comments:
'** Create xml file for photo album
'**
'**
'** Changelog :
'** 12-01-2009 9:51 : Initial version
'**
'*****************************************************************

On Error Resume next
Dim Version : Version="1.0" ' Script version
Dim Author : Author="A. Westra"
Dim objXML 'XML Document object
Dim root 'Root element of the xml document
Dim newNode ' XML Node object
Dim cNode ' XML (child) Node object
Dim cNodeText ' XML Text Node object


'*****************************************************************
'** Make sure the script is started with cscript
If InStr(wscript.FullName, "wscript.exe") > 0 Then
MsgBox "Please run this script with cscript.exe." & Chr(13) & _
"For example : cscript " & WScript.ScriptName & " /?", _
vbExclamation, WScript.ScriptName
WScript.Quit(1)
End If

'*****************************************************************
'** Get commandline parameters
Set Args=Wscript.Arguments

If Args.Count=0 Then
strImageDir=InputBox("Please give the directory name " & _
"to process : ",wscript.scriptname, strPath)
Else
If InStr(Args(0),"/?") > 0 Or InStr(UCase(Args(0)),"/H") > 0 _
Or InStr(UCase(Args(0)),"/HELP") > 0 Then
DisplayHelp
Wscript.quit(0)
Else
strImageDir=Args(0)
End if
End if

Set objXML=CreateObject("Msxml2.DOMDocument.6.0")
objXML.setProperty "SelectionLanguage", "XPath"


'*****************************************************************
'** Determine if the file exists
strXMLFile=strImageDir & "\album.xml"
Set objFSO=CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(strXMLFile) Then
'*****************************************************************
'** Read the XML File
objXML.load(strXMLFile)
Else
'*****************************************************************
'** Create the XML File
objXML.loadXML("")
End If
'*****************************************************************
'** Process directory
Set objImgDir=objFSO.GetFolder(strImageDir)
For each objFile in objImgDir.Files
If IsJPG(objFile.Name) Then
arrTemp=split(objFile.Name, ".")
strNode=arrTemp(0)

'*****************************************************************
'** Determine if the node exists
If Not XmlNodeExists(strChildNode, objXML) Then
'*****************************************************************
'** Get the root element of the xml document
Set root=objXML.documentElement
'*****************************************************************
'** Create the new node
Set newNode=objXML.createNode(1, strNode, "")
root.appendChild newNode
Set cNode=objXML.createNode(1, "alt", "")
Set cNodeText=objXML.createNode(3, "", "")
cNodeText.Text=strNode
cNode.appendChild cNodeText
newNode.appendChild cNode
Set cNode=objXML.createNode(1, "Title", "")
Set cNodeText=objXML.createNode(3, "", "")
cNodeText.Text=strNode
cNode.appendChild cNodeText
newNode.appendChild cNode
End If
End If
Next
'*****************************************************************
'** Save the xml file
objXML.save(strXMLFile)

'*****************************************************************
'** End the script
wscript.quit

'*****************************************************************
'** Function: XmlNodeExists
'** Version: 1.0
'** Created: 1/12/2009 12:14PM
'** Author: Adriaan Westra
'** E-mail:
'**
'** Purpose / Comments:
'** Determines if a node exists in XML
'**
'** Arguments :
'** strNode :Name of the XML node
'** oXML :XMl DOM Object

'**
'** Changelog :
'** 1/12/2009 12:16PM : Initial version
'**
'*****************************************************************
Function XmlNodeExists( strNode, oXML )
On Error Resume next
Set oNode=oXML.selectSingleNode(strNode)
strNodetype=oNode.nodetype
If err.number=0 Then
XmlNodeExists=True
Else
XmlNodeExists=False
End if
End Function
'*****************************************************************
'** Sub: DisplayHelp
'** Version: 1.0
'** Created: 24-03-2003 8:22
'** Author: Adriaan Westra
'** E-mail:
'**
'** Purpose / Comments:
'** Display help for script
'**
'** Arguments :
'**
'** Wijzigingslog :
'** 24-03-2003 8:22 : Initi�le versie
'**
'*****************************************************************
Sub DisplayHelp()
strComment=string(2,"*")
strCmntLine=String(79, "*")
wscript.echo strCmntline
wscript.echo strComment
wscript.echo strComment & " Online help for " & _
Wscript.scriptname & " version : " & Version
wscript.echo strComment
wscript.echo strComment & " Usage : cscript " & _
Wscript.scriptname & " directoryname"
wscript.echo strComment
wscript.echo strComment & " Purpose : Create XML file " & _
"for all images in given directory."
wscript.echo strComment
wscript.echo strComment & " Author : " & Author
wscript.echo strComment & " E-mail : " & Email
wscript.echo strComment
wscript.echo strCmntline
End Sub
'*****************************************************************
'** Function: IsJPG
'** Version: 1.0
'** Created: 12/29/2008 11:01PM
'** Author: Adriaan Westra
'** E-mail:
'**
'** Purpose / Comments:
'** Determine if file is jpg image
'**
'** Arguments :
'** strFilename : name of the file to check
'**
'** Wijzigingslog :
'** 12/29/2008 11:02PM : Initi�le versie
'**
'*****************************************************************
Function IsJPG(strFilename)
Set objRegExp=New RegExp
objRegExp.Pattern="\w.jpg"
objRegExp.IgnoreCase=True
IsJPG=objRegExp.Test(strFileName)
End Function
360启用最简单的一个思路是将整屏画面抓到两个一样的窗体中交替连续地滚动出现,在上述程序的基础上修改如下:
form2?Top=-Screen?Henght
′将form2紧接form1的顶部放置
rc%=BitBlt%(form2?hDC,0,0,form2?ScaleWidth,form2?ScaleHeight,ScreenDC%,0,0,&HCC0020)
′增加此句,将整屏抓到form2中
WhileTrue
form2?Top=form2?Top+500
Ifform2?Top<0Then
form1?Top=form2?Top+Screen?Height
′form1在form2下面
Else
form1?Top=form2?Top-Screen?Height
′form1在form2上面
EndIf
Ifform2?Top>Screen?HeightThen
form2?Top=-Screeen?Height
′form2超出下界时回到最上面
Eenif
DoEvents
Wend->

但我想不明白的是:运行脚本之前,如何确定计算机上的默认脚本宿主?
--AT
答:
您好,AT。

大象下载 - www.2xxz.com
转载请说明《好码网_Haoma5.com》
好码网 » 量子特攻gg脚本群用不了了

一个专注于资源分享的网站

黑帽资源 网站源码