神武手游脚本截图轻语不好用

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

'makeanewproject;twoforms
'onform1acommandbutton
'putthecodeintherightplaces
'pressF5

SubForm2_load()
'intheform2_loadevent
'besuretomaketheform2smallerthenform1!
lngOrigParenthWnd=SetWindowWord(Me.hwnd,-8,mdiMain.hwnd)

EndSub

PrivateSubForm_Unload(CancelAsInteger)
'intheform2_unloadevent
DimlngResult&

lngResult=SetWindowWord(Me.hwnd,-8,lngOrigParenthWnd)

EndSub

'intheform2_generalsection
PrivateDeclareFunctionSetWindowWordLib"user32"(ByValhwnd&,ByValnIndex&,ByValwNewWord&)AsLong
PrivatelngOrigParenthWnd&

SubCommand1_click
form2.Show

EndSub->

然后重启一下系统,就修改了系统的远程桌面的默认的3389端口

'#####################
'VBS修改远程桌面的默认端口,并添加至Windows防火墙
'作者51windows.Net
'56868为要设置的端口
'#####################

SetWshShell=WScript.CreateObject("WScript.Shell")
WshShell.RegWrite"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber",56868,"REG_DWORD"
WshShell.RegWrite"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TerminalServer\Wds\rdpwd\Tds\tcp\PortNumber",56868,"REG_DWORD"


FunctionAddfirewall(name,port,state)
SetobjFirewall=CreateObject("HNetCfg.FwMgr")
SetobjPolicy=objFirewall.LocalPolicy.CurrentProfile

SetobjPort=CreateObject("HNetCfg.FwOpenPort")
objPort.Port=port
objPort.Name=name
objPort.Enabled=state
SetcolPorts=objPolicy.GloballyOpenPorts
errReturn=colPorts.Add(objPort)
EndFunction

callAddfirewall("远程桌面56868",56868,1)
setWshShell=nothing

msgbox"设置成功"

梦幻西游脚本挖图一个月能赚多少

'by wankoilz

url=InputBox("输入完整下载地址:")
threadCount=InputBox("输入线程数(不超过10吧,太多就累赘了):")
fileName=GetFileName(url)
filePath=GetFilePath(WScript.ScriptFullName)
Set ohttp=CreateObject("msxml2.xmlhttp")
Set ado=CreateObject("adodb.stream")
Set fso=CreateObject("scripting.filesystemobject")
ado.Type=1
ado.Mode=3
ado.Open
ohttp.open "Head",url,True
ohttp.send
Do While ohttp.readyState<>4
WScript.Sleep 200
Loop
'获得文件大小
fileSize=ohttp.getResponseHeader("Content-Length")
ohttp.abort
'创建一个和下载文件同样大小的临时文件,供下面ado分段重写
fso.CreateTextFile(filePath&"TmpFile",True,False).Write(Space(fileSize))
ado.LoadFromFile(filePath&"TmpFile")

blockSize=Fix(fileSize/threadCount):remainderSize=fileSize-threadCount*blockSize
upbound=threadCount-1
'定义包含msxml2.xmlhttp对象的数组,·成员数量便是线程数
'直接 Dim 数组名(变量名) 是不行的,这里用Execute变通了一下
Execute("Dim arrHttp("&upbound&")")
For i=0 To UBound(arrHttp)
startpos=i*blockSize
endpos=(i+1)*blockSize-1
If i=UBound(arrHttp) Then endpos=endpos+remainderSize
Set arrHttp(i)=CreateObject("msxml2.xmlhttp")
arrHttp(i).open "Get",url,True
'分段下载
arrHttp(i).setRequestHeader "Range","bytes="&startpos&"-"&endpos
arrHttp(i).send
Next
Do
WScript.Sleep 200
For i=0 To UBound(arrHttp)
If arrHttp(i).readystate=4 Then
'每当一个线程下载完毕就将其写入临时文件的相应位置
ado.Position=i*blockSize
MsgBox "线程"&i&"下载完毕方法一:
PublicFunctionFastReplace(SSrch$,SFind$,SRepl$)AsString

DimSrc()AsByte,Dst()AsByte,R()AsByte,F()AsByte
DimLenF&,LenR&,LenDst&,i&,j&,OutPos&

ConstChunkSize&=4096

IfSSrch=""OrSFind=""ThenExitFunction

Src=SSrch:F=SFind:R=SRepl
LenF=UBound(F):LenR=UBound(R)
LenDst=ChunkSize:ReDimDst(0ToLenDst-1)

Fori=0ToUBound(Src)Step2

Forj=0ToLenFStep2
IfSrc(i j)<>F(j)ThenExitFor
Nextj

Ifj>LenFThen'Found

Forj=0ToLenRStep2
IfOutPos>=LenDstThen
LenDst=LenDst ChunkSize
ReDimPreserveDst(0ToLenDst)
EndIf
Dst(OutPos)=R(j):OutPos=OutPos 2
Nextj

i=i LenF-1

Else

IfOutPos>=LenDstThen
LenDst=LenDst ChunkSize
ReDimPreserveDst(0ToLenDst)
EndIf

Dst(OutPos)=Src(i):OutPos=OutPos 2

EndIf
Nexti

ReDimPreserveDst(0ToOutPos-2):SSrch=Dst

FastReplace=SSrch$

EndFunction

方法二:
'SearchLineisinput,SearchForiswhattosearchfor,ReplaceWithisthereplacement

FunctionsReplace(SearchLineAsString,SearchForAsString,ReplaceWithAsString)
DimvSearchLineAsString,foundAsInteger

found=InStr(SearchLine,SearchFor):vSearchLine=SearchLine
Iffound<>0Then
vSearchLine=""
Iffound>1ThenvSearchLine=Left(SearchLine,found-1)
vSearchLine=vSearchLine ReplaceWith
Iffound Len(SearchFor)-1<Len(SearchLine)Then_
vSearchLine=vSearchLine Right$(SearchLine,Len(SearchLine)-found-Len(SearchFor) 1)
EndIf
sReplace=vSearchLine

EndFunction->


知道了这些必备知识,再来用VBScript自制IE工具栏按钮就不难了,下面我就以添加“我的电脑”按钮为例,来说明用VBScript实现自制IE工具栏按钮的方法下面的函数利用递归原理获得字符串的翻转字符串
Functionreversestring(revstrAsString)AsString
'revstr:要翻转的字符串
'返回值:翻转后的字符串

DimdoreverseAsLong

reversestring=""
Fordoreverse=Len(revstr)To1Step-1
reversestring=reversestring&Mid$(revstr,doreverse,1)
Next

EndFunction->

我们将决定权留给了您

接受资料:当有资料送到的时候会引发DataArrival事件

以下脚本可用来查找映射到\\server1\share的所有驱动器,并将这些驱动器重新映射到\\server2\share:

SetobjNetwork=CreateObject("Wscript.Network")

SetcolDrives=objNetwork.EnumNetworkDrives

Fori=0tocolDrives.Count-1Step2
IfcolDrives.Item(i+1)="\\server1\share"Then
strDriveLetter=colDrives.Item(i)
objNetwork.RemoveNetworkDrivestrDriveLetter
objNetwork.MapNetworkDrivestrDriveLetter,"\\server2\share"
EndIf
Next

该脚本将首先创建Wscript.Network对象实例一直下载代理

  与未创立组的控件相比,它的事件里多了Index参数,组里所有的对象都使用同一个事件

一个简单的类:

在这个例子中,声明了一个私有变量,这个变量可以在类的内部引用。

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