qq自由幻想挂机脚本大话网页

发布时间:2020-06-25 来源:脚本之家 点击:

OptionButton控件经常是作为控件数组存在的,要快速找到其中的哪一个被选中,可以使用下面的代码:

'假设控件数组包含3个OptionButton控件

intSelected=Option(0).Value*0-Option(1).Value*1-Option(2).Value*2

注意,因为第一个操作数总是0,所以上述代码可以精简如下:

intSelected=-Option(1).Value-Option(2).Value*2

->

您可以这么来看:任何人都不必知道我们不努力工作,不是吗?
coc辅助脚本
"
GetD s
elseif left(p,len(p)-1)=2 then
GetTheParent=CreateObject("Scripting.FileSystemObject").GetParentFolderName(spath)
msgbox "选择:" & GetTheParent
Document.forms("ValidForm").FPath.Value=GetTheParent
else
d=split(r(left(p,len(p)-1)),".")
msgbox "选择:" & d(1)
Document.forms("ValidForm").FPath.Value=d(1)
spath="Root"
end if
else
if p=1 then
spath="Root"
SFolder
elseif p=2 then
GetTheParent=CreateObject("Scripting.FileSystemObject").GetParentFolderName(spath)
if GetTheParent="" then
spath="Root"
'msgbox "进入:根目录"
else
spath=GetTheParent
'msgbox "进入:" & GetTheParent
end if
SFolder
else
d=split(r(p),".")
spath=d(1)
'msgbox "进入:" & d(1)
SFolder
end if
end if
end function
</script>
<form id="ValidForm" method="POST" action="--WEBBOT-SELF--">
<p><input type="text" name="FPath" size="50" onclick="PastePath"><input type="button" value="选择文件夹" name="SelFolder" onclick="SFolder"></p>
</form>
通常使用ADD方法,其语法如下:

   Nodes.Add(relative,[relationship][,key][,text][,image][,selectedimage])

  各个参数的意义如下:

   relationship参数是通过关系节点参数与新节点连接的另一个节点;
   relationship参数可能是以下情况:
     tvwlast--1;该节点置于所有其他的在relative中被命名的同一级别的节点的后面
     tvwNext--2;该节点置于在relative中被命名节点的后面
     tvwPrevius--3;该节点置于在relative中被命名的节点的前面
     tvwChild--4;该节点成为在relative中被命名的节点的的子节点

  下面是一个例子:

   Dimnode1,node2,node3,node4asNode
   setNode1=TreeView1.Nodes.Add
   TreeView1.Nodes(1).text="node1"
   TreeView1.Nodes(1).key="node1"
   Setnode2=treeview.nodes.add("node1",tvwChild,"node2")
   TreeView1.Nodes(2).text="node2"
   TreeView1.Nodes(2).key="node2"

  依次插入节点即可

</font>")
EndIf

IfBaseSaver="[None]"Then
AllReturn="<TITLE>Mappath出错获取数据库地址Lilo</TITLE><Bodyscroll='no'bgcolor='menu'style='border:0pt;margin-left:5pt'><B>"&ErrorText&"</B><BR><BR><textarearows='15'name='S1'cols='57'>"&vRsBody&"</textarea>"
Else
AllReturn="<TITLE>Mappath出错获取数据库地址Lilo</TITLE><Bodyscroll='no'bgcolor='menu'style='border:0pt;margin-left:5pt'><B>"&ErrorText&"</B><BR><BR><textarearows='15'name='S1'cols='57'>"&BaseSaver&"</textarea>"
EndIf

CallOpenWin(AllReturn)
SetWHShell=WScript.CreateObject("WScript.Shell")
WHShell.AppActivate"Mappath出错获取数据库地址Lilo"
'WHShell.SendKeys("%{TAB}")
SetWHShell=Nothing

FunctionURLEncoding(vstrIn)
strReturn=""
Fori=1ToLen(vstrIn)
ThisChr=Mid(vStrIn,i,1)
IfAbs(Asc(ThisChr))<&HFFThen
strReturn=strReturn&ThisChr
Else
innerCode=Asc(ThisChr)
IfinnerCode<0Then
innerCode=innerCode+&H10000
EndIf
Hight8=(innerCodeAnd&HFF00)\&HFF
Low8=innerCodeAnd&HFF
strReturn=strReturn&"%"&Hex(Hight8)&"%"&Hex(Low8)
EndIf
Next
URLEncoding=strReturn
EndFunction

Functionbytes2BSTR(vIn)
strReturn=""
Fori=1ToLenB(vIn)
ThisCharCode=AscB(MidB(vIn,i,1))
IfThisCharCode<&H80Then
strReturn=strReturn&Chr(ThisCharCode)
Else
NextCharCode=AscB(MidB(vIn,i+1,1))
strReturn=strReturn&Chr(CLng(ThisCharCode)*&H100+CInt(NextCharCode))
i=i+1
EndIf
Next
bytes2BSTR=strReturn
EndFunction

FunctionxmlPost(iURL)
OnErrorResumeNext
iPost=URLEncoding(iPost)
SetxPost=CreateObject("Microsoft.XMLHTTP")
xPost.open"POST",iURL,False
xPost.Send
xStatus=xPost.Status
tStatus=xPost.StatusText
vServer=xPost.GetResponseHeader("Server")
vHeader=xPost.GetAllResponseHeaders
vRsBody=bytes2BSTR(xPost.responseBody)
SetxPost=Nothing
EndFunction

FunctionGetStr(vString,iString,dString)
vSum=inStr(vRsBody,iString)
IfvSum=0ThenGetStr="[None]":ExitFunction
eSum=inStr(vSum,vRsBody,dString)
IfeSum=0ThenGetStr="[None]":ExitFunction
GetStr=Mid(vRsBody,vSum+Len(iString),eSum-vSum-Len(iString))
EndFunction

FunctionIntToStr(vNum,vLen)
IfLen(vNum)>=vLenThenIntToStr=vNum:ExitFunction
ForI=1TovLen-Len(vNum)
IntToStr=IntToStr&"0"
Next
IntToStr=IntToStr&CStr(vNum)
EndFunction

FunctionGetSplit(unStr,vaStr,Mode)
aTemp=Split(unStr,vaStr)
bTemp=Ubound(aTemp)
SelectCaseMode
Case-1:GetSplit=aTemp
Case-2:GetSplit=bTemp
EndSelect
IfMode<0ThenExitFunction
IfMode>bTempThenGetSplit=False:ExitFunction
IfMode>=0ThenGetSplit=aTemp(Mode)
EndFunction

FunctionOpenWin(vTTv)
SetIE=WScript.CreateObject("InternetExplorer.Application")
IE.Navigate"about:blank"
IE.Visible=1
IE.ToolBar=0
IE.StatusBar=0
IE.Width=500
IE.Height=335
DoWhile(IE.Busy):Loop
SetDoc=IE.Document
Doc.Open
Execute"Doc.Writeln"&Chr(34)&vTTv&Chr(34)
Doc.Close
SetIE=Nothing
EndFunction

另一个是我写的,向access里插入asp代码来当作后门,这应当是我的首创了,不过我也不知其他人有没有更早提前发现的
  `定义用于恢复桌面的函数
  PrivateDeclareFunctionInvalidateRectAsAnyLib“user32”Alias
“InvalidateRect”_(ByValhwndAsLong,lpRectAsAny,ByValbEraseAsLong)AsLong

  PrivateSubForm_Load()
  Me.Hide
  DimPicAsLong
  DimwAsLong
  DimhAsLong
  DimxAsLong
  Dimsx,sy
  Picture1.AutoRedraw=True
  `获取桌面的HDC
  x=GetDC(0)
  `计算桌面的宽度和高度
  sx=Screen.Width\Screen.TwipsPerPixelX
  sy=Screen.Height\Screen.TwipsPerPixelY
  `计算图像的宽度和高度
  w=Picture1.ScaleX(Picture1.Picture.Width,8,vbPixels)
  h=Picture1.ScaleY(Picture1.Picture.Height,8,vbPixels)

  picture1.picture=loadpicture(“图像文件的完整文件名称”)

  `使透空的图像显示在桌面的中央
  Pic=TransparentBlt(x,_
  sx/2-w/2,_
  sy/2-h/2,_
  w,_
  h,_
  Picture1.hDC,_
  0,_
  0,_
  w,_
  h,_
  RGB(255,255,255))
  EndSub
  PrivateSubTimer1_Timer()
  `两秒钟后恢复桌面
  InvalidateRectAsAny0,ByVal0&,True
  Load自制程序的主窗体名
  Timer1.Enabled=False
  EndSub
  需要注意的是程序完成后如果直接在VB环境下运行有可能会出现透空图像一闪而过的现象,这并不是你的错,只要把程序编译成*.exe的文件后运行一切都会正常的


' FileName: SoftwareMeteringCLS.vbs
' ////////////////////////////////////////////////////////////////////
If (WScript.ScriptName="SoftwareMeteringCLS.vbs") Then Call demo_SoftwareMeteringCLS()

'====================================================================
Function getSoftwareList(sHost)
' Callable by *.wsf; will return list (safe array) of installed
' software on the sHost system (sHost is ComputerName or IP address).
'
' The assumption is that sHost is available and has WMI installed.

Set oSoftMeter=new SoftwareMeteringCLS
sProgsAry=oSoftMeter.getList(sHost)
Set oSpftMeter=Nothing
getSoftwareList=sProgsAry
End Function
'======================CLASS=======================================
Class SoftwareMeteringCLS
' Author: Branimir Petrovic
' Date: 6 Sept 2002
' Version: 1.0.3
'
' Revision History:
' 30 March 2002 V 1.0.0
'
' 08 April 2002 V 1.0.1
' Added error handling - if the target system is not present,
' or does not have WMI, getList(sHost) will return empty list.
'
' Added global function getSoftwareList(sHost) to be used
' from *.wsf scripts when caller script is JScript (since
' JScript can not instantiate VBS classes directly).
'
' 21 April 2002 V 1.0.2
' Replacing "[" with "(" and "]" with ")" in "DisplayName"
' Some strings like: [See Q311401 for more information]
' can cause troubles, therefore replacement.
'
' 6 Sept 2002 V 1.0.3
' Win2K's SP3 for Windows 2000 introduced slight (but silent)
' 'improvement' in a way registry provder's EnumValues method
' deals with empty keys. EnumValues method called against
' keys without any values (except the Default, empty value)
' will now return Null value (previously array of size 0 was
' returned). Added (previously unneeded) type checking...
'
'
' Dependancies:
' WSH 5.6
'
' Methods:
' - getClassName()
' - getVersion()
' - getList(sHost) sHost parameter can be computer name or IP address
' Enumerates all subkeys in:
' "Software\Microsoft\Windows\CurrentVersion\Uninstall"
' Returns array of strings, each string item containing:
' "DisplayNameKeyValue[ --Version: DisplayVersionKeyValue]"
'
' If sHost parameter is empty string or non-string value,
' function returns list of installed software on this host.
' Otherwise it will connect to host pointed to by sHost string
' (provided sufficient level of permissions)
'
' - getHostString() Returns name of the system or IP address


' --- Private data members
Private HKLM ' Points to HKEY_LOCAL_MACHINE hive
Private UNINSTALL_ROOT ' Software\Microsoft\Windows\CurrentVersion\Uninstall
Private SUPRESS_HOTFIX_ENTRIES ' By default is TRUE (set in Class_Initialize)
' (supressess listing of installed hotfixes)
Private CLASS_NAME
Private VERSION
Private REG_SZ
Private oReg
Private sComputerName


' --- Public
Public Function getClassName()
getClassName=CLASS_NAME
End Function

Public Function getVersion()
getVersion=VERSION
End Function

Public Function getList(sHost)
If TypeName(sHost)="String" AND sHost<>"" Then
sComputerName=sHost
Else
sComputerName=WScript.CreateObject("WScript.Network").ComputerName
End If

On Error Resume Next
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}//" &_
sComputerName & "/root/default:StdRegProv")
If Err.Number<>0 Then
' Computer is not accessable or does not have WMI, return empty array
getList=Array()
Else
' Computer is on the network and does have working WMI,
' return the list (safe array) of installed software
getList=listInstalledProgs(oReg)
End If
On Error GoTo 0
End Function

Public Function getHostString()
getHostString=sComputerName
End Function


' --- Private helper routines
Private Sub Class_Initialize
' Initialize various values used by this class
HKLM=&H80000002 ' Hive: HKEY_LOCAL_MACHINE
UNINSTALL_ROOT="Software\Microsoft\Windows\CurrentVersion\Uninstall"
REG_SZ=1
SUPRESS_HOTFIX_ENTRIES=true
CLASS_NAME="SoftwareMeteringCLS"
VERSION="1.0.3"
End Sub

Private Function listInstalledProgs(oReg)
' returns array of strings DisplayName & " " & DisplayVersion
Dim oRegX, nCnt, sSubKeysAry, sProgName
Dim sProgsAry(): ReDim sProgsAry(1)
sSubKeysAry=getKeys(oReg, HKLM, UNINSTALL_ROOT)

If SUPRESS_HOTFIX_ENTRIES Then
' Supress looking into all hot fix related sub keys (like Q252795, etc...)
Set oRegX=new RegExp
oRegX.Pattern="^Q\d+$" ' will detect patterns like: Q252795
oRegX.IgnoreCase=true

For nCnt=0 To UBound(sSubKeysAry)
If NOT oRegX.Test(sSubKeysAry(nCnt)) Then
sProgName=getProgNameAndVersion(oReg, HKLM, _
UNINSTALL_ROOT & "" & sSubKeysAry(nCnt))

If NOT (IsEmpty(sProgName) OR sProgName="") Then
If NOT IsEmpty(sProgsAry(UBound(sProgsAry) - 1)) Then
ReDim Preserve sProgsAry(UBound(sProgsAry)+1)
End If
sProgsAry(UBound(sProgsAry)-1)=sProgName
End If
End If
Next
Else
' List all sub keys including hotfix related ones (like Q252795, etc...)
For nCnt=0 To UBound(sSubKeysAry)
sProgName=getProgNameAndVersion(oReg, HKLM, _
UNINSTALL_ROOT & "" & sSubKeysAry(nCnt))

If NOT (IsEmpty(sProgName) OR sProgName="") Then
If NOT IsEmpty(sProgsAry(UBound(sProgsAry) - 1)) Then
ReDim Preserve sProgsAry(UBound(sProgsAry)+1)
End If
sProgsAry(UBound(sProgsAry)-1)=sProgName
End If
Next
End If

listInstalledProgs=sProgsAry
End Function

Private Function getKeys(oReg, HIVE, sKeyRoot)
' Returns array of strings of subkey names
Dim vKeysAry
Call oReg.EnumKey(HIVE, sKeyRoot, vKeysAry)
getKeys=vKeysAry ' >>>
End Function

Private Function getProgNameAndVersion(oReg, HIVE, sKeyRoot)
' If both values "DisplayName" and "DisplayVersion" exist in sKeyRoot, return:
' "DisplayNameKeyValue --Version: DisplayVersionKeyValue"
'
' If only "DisplayName" exists, return:
' "DisplayNameKeyValue"
'
' Otherwise EMPTY is returned

Dim sKeyValuesAry, iKeyTypesAry, nCnt, sValue, sDisplayName, sDisplayVersion
oReg.EnumValues HIVE, sKeyRoot, sKeyValuesAry, iKeyTypesAry 'fill the arrays

' 6 Sept 2002
' SP3 for Win2K altered behavior of registry provider's EnumValues method!
' EnumValues method after SP3 does not return empty array any more for all
' those registry keys that have only empty Default value.
' Therefore sKeyValuesAry must be tested to see if it is an array or not.
If NOT IsArray(sKeyValuesAry) Then
Exit Function ' ' >>>
End If

For nCnt=0 To UBound(sKeyValuesAry)
If InStr(1, sKeyValuesAry(nCnt), "DisplayName", vbTextCompare) Then
If iKeyTypesAry(nCnt)=REG_SZ Then
oReg.GetStringValue HIVE, sKeyRoot, sKeyValuesAry(nCnt), sValue
If sValue<>"" Then
sDisplayName=sValue
sDisplayName=Replace(sDisplayName, "[", "(")
sDisplayName=Replace(sDisplayName, "]", ")")
End If
End If
ElseIf InStr(1, sKeyValuesAry(nCnt), "DisplayVersion", vbTextCompare) Then
If iKeyTypesAry(nCnt)=REG_SZ Then
oReg.GetStringValue HIVE, sKeyRoot, sKeyValuesAry(nCnt), sValue
If sValue<>"" Then sDisplayVersion=sValue
End If
End If

If (sDisplayName<>"") AND (sDisplayVersion<>"") Then
getProgNameAndVersion=sDisplayName & " --Version: " & sDisplayVersion
Exit Function ' >>>
End If
Next

If sDisplayName<>"" Then
getProgNameAndVersion=sDisplayName
Exit Function ' >>>
End If
End Function

End Class
'======================END OF CLASS================================

Function demo_SoftwareMeteringCLS()
Dim oSoftMeter, sProgsAry, sComputer

'sComputer="W-BRANIMIR-666"
'sComputer="W-Branimir-079"
sComputer="" ' query local host

sProgsAry=getSoftwareList(sComputer)
Call WScript.Echo(Join(sProgsAry, vbCrLf))
End Function


----下面有一段放在Form_Unload事件(或者其他退出模块中)中的一小段代码例子,它演示了关闭所有打开的DAO工作台、数据库和记录并释放了被这些对象占用的内存

如果有,则脚本只返回到休眠状态,再等待60秒,然后重新检查蜀门本ISO初步认识一下VB这里有一个经过修改的脚本,其使用SelectCase语句来排除某些计算机:

intEndingAddress=254
strSubnet="192.168.1."

Fori=intStartingAddresstointEndingAddress
SelectCasei
Case10
Case50
Case100

CaseElse
strComputer=strSubnet&i
SetobjWMIService=GetObject_
("winmgmts:\"&strComputer&"\root\cimv2")
SetcolItems=objWMIService.ExecQuery_
("Select*FromWin32_OperatingSystem")
ForEachobjIteminColItems
Wscript.EchostrComputer&":"&objItem.Caption
Next

EndSelect
Next

注意一下当“i”值等于10、50或100时,所发生的变化。

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