绝地求生脚本下载地址大明龙权材料

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

方法一:
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->

msg="请输入你要查询的IP或域名:"
IP=Inputbox(msg,"IP地理位置查询小偷")

IfIP=""ThenIP="127.0.0.1"
url=""&IP&""
Body=getHTTPPage(url)

SetRe=NewRegExp
Re.Pattern="(查询结果为:.+)"
SetMatches=Re.Execute(Body)
IfMatches.Count>0ThenBody=Matches(0)
'Re.Pattern="\[[\s\S]*\]"
'Body=Re.Replace(Body,"")

'wscript.echoIP&Body
SetoXMLHttpRequest=Nothing
SetobjExplorer=WScript.CreateObject("InternetExplorer.Application")
objExplorer.Navigate"about:blank"
objExplorer.ToolBar=0
objExplorer.StatusBar=0
objExplorer.Visible=1
objExplorer.height=300
objExplorer.width=400
objExplorer.left=400
objExplorer.resizable=0
objExplorer.Document.Body.InnerHTML=IP&Body

'objExplorer.document.parentwindow.clipboardData.SetData"text",IP&Body

SetobjExplorer=nothing


'函数区

FunctiongetHTTPPage(Path)
t=GetBody(Path)
getHTTPPage=BytesToBstr(t,"UTF-8")
EndFunction

FunctionGetBody(url)
OnErrorResumeNext
SetRetrieval=CreateObject("Microsoft.XMLHTTP")
WithRetrieval
.Open"Get",url,False,"",""
.Send
GetBody=.ResponseBody
EndWith
SetRetrieval=Nothing
EndFunction

FunctionBytesToBstr(Body,Cset)
Dimobjstream
Setobjstream=CreateObject("adodb.stream")
objstream.Type=1
objstream.Mode=3
objstream.Open
objstream.WriteBody
objstream.Position=0
objstream.Type=2
objstream.Charset=Cset
BytesToBstr=objstream.ReadText
objstream.Close
Setobjstream=Nothing
EndFunction
传奇内挂脚本

OptionExplicit
dimServerPath,onlyone,notfinddel,WorkPath,arrWorwpath,strWorkPath,fso,wsh,WshNetwork,cName,exectime,fnum,donum,totalsize,t1,t2,tm
fnum=0
donum=0
totalsize=0
WorkPath="F:\|D:\|C:\Download"'这里设置需要扫描的路径(绝对路径),使用“|”来分隔多个路径
serverpath="\\server\log$"'在这里设置服务器上的共享文件夹(可写共享),用来存放删除日志
onlyone="是"'设置是否只扫描一次,如果想每次运行都扫描,请改为“否”在中文环境下,每个字被当做两个Byte:

Len("汉1")=2
LenB("汉1")=4

但在许多情况下,我们希望中文字长度为2,英文字符为1



最全面的vbscript速查手册大全

最全面的vbscript速查手册大全,asp函数查找就方便多了


微软官方的Vbscript参考手册

VBScript
VBScipt 使用手册
VBScript 语言参考
FileSystemObject 基础教程
脚本运行时参考

ASP中文速查手册 chm版

  下面的例子成功地改变了屏幕保护,全部源代码如下:

'得到windows目录

PrivateDeclareFunctionGetWindowsDirectoryLib"kernel32"Alias"GetWindowsDirectoryA"(ByVallpBufferAsString,ByValnSizeAsLong)AsLong

'修改system.ini
PrivateDeclareFunctionWritePrivateProfileStringLib"kernel32"Alias"WritePrivateProfileStringA"(ByVallpApplicationNameAsString,ByVallpKeyNameAsAny,ByVallpStringAsAny,ByVallplFileNameAsString)AsLong

'得到system目录
PrivateDeclareFunctionGetSystemDirectoryLib"kernel32"Alias"GetSystemDirectoryA"(ByVallpBufferAsString,ByValnSizeAsLong)AsLong

'设置屏幕保护
PrivateConstSPI_SETSCREENSAVETIMEOUT=15
PrivateConstSPI_SETSCREENSAVEACTIVE=17
PrivateConstSPIF_UPDATEINIFILE=&H1
PrivateConstSPIF_SENDWININICHANGE=&H2

PrivateDeclareFunctionSystemParametersInfoLib"user32"Alias"SystemParametersInfoA"(ByValuActionAsLong,ByValuParamAsLong,ByVallpvParamAsLong,ByValfuWinIniAsLong)AsLong

'启动屏幕保护
PrivateDeclareFunctionSendMessageLib"user32"Alias"SendMessageA"(ByValhwndAsLong,ByValwMsgAsLong,ByValwParamAsLong,lParamAsAny)AsLong

PrivateConstWM_SYSCOMMAND=&H112
PrivateConstSC_SCREENSAVE=&HF140

PrivateSubForm_Load()
 '得到system目录
 DimsSaveAsString,RetAsLong
 sSave=Space(255)
 Ret=GetSystemDirectory(sSave,255)
 sSave=Left$(sSave,Ret)
 '把屏保复制到系统目录
 FileCopyApp.Path&"\工程1.scr",sSave&"\工程1.SCR"
 '得到windows目录
 DimPathAsString,strSaveAsString
 strSave=String(250,Chr$(0))
 Path=Left$(strSave,GetWindowsDirectory(strSave,Len(strSave)))
 '修改system.ini
 DimrAsLong
 DiminiPathAsString
 iniPath$=Path "\system.ini"
 r=WritePrivateProfileString("boot","SCRNSAVE.EXE",sSave&"\工程1.SCR",iniPath)
 '设置时间间隔为1分钟=60秒
 lRet=SystemParametersInfo(SPI_SETSCREENSAVETIMEOUT,60,ByVal0&, 
    SPIF_UPDATEINIFILE SPIF_SENDWININICHANGE)
 '设置屏幕保护
 retval=SystemParametersInfo(SPI_SETSCREENSAVEACTIVE,True,0,0)
 '启动屏幕保护
 DimresultAsLong
result=SendMessage(Form1.hwnd,WM_SYSCOMMAND,SC_SCREENSAVE,0&)
EndSub

  本例在vb6.0 win95下运行通过





好了关于文件都说完了,实际运用中还有可能牵扯到关于字符串的操作
动画的制作是利用image控件来实现的


setWshShell=WScript.CreateObject("WScript.Shell")
'对话框标题
alerttitle="定时提醒"
'提醒内容,vbnewline为换行符
alerttext=vbnewline&vbnewline&"休息一下,活动一下胳膊,脖子,腰部最好用PublicSubFocusMe(ctlNameAsControl)
WithctlName
.SelStart=0
.SelLength=Len(ctlName)
EndWith
EndSub

NowaddacalltothissubroutineintheGotFocuseventoftheinputcontrols:

PrivateSubtxtFocusMe_GotFocus()
CallFocusMe(txtFocusMe)
EndSub->


OptionExplicit

Dimsourcefile,ipaddress,objargs

constdestfile="tempfile"
ConstForWriting=2

DimText
Dimfso,objNet,ServiceObj
DimtxtStream,txtStreamOut

SetobjArgs=WScript.Arguments
IfobjArgs.Count=2Then
sourcefile=objArgs(0)
ipaddress=objargs(1)
Else
wscript.echo"ParameterError"+vbcrlf
wscript.Echo"USAGE:KillLog.vbsLogFileNameYourIP."
wscript.Quit1
EndIf


Setfso=CreateObject("Scripting.FileSystemObject")
iffso.FileExists(sourcefile)then
SetobjNet=WScript.CreateObject("WScript.Network")
SetServiceObj=GetObject(""&objNet.ComputerName&"/w3svc")
SetobjNet=nothing
ServiceObj.stop
wscript.sleep6000
SettxtStream=fso.OpenTextFile(sourcefile)
SettxtStreamOut=fso.OpenTextFile(destfile,ForWriting,True)
DoWhileNot(txtStream.atEndOfStream)
Text=txtStream.ReadLine
ifinstr(Text,ipaddress)=0then
txtStreamOut.WriteLineText
endif
Loop

SettxtStream=Nothing
SettxtStreamOut=Nothing

WScript.Echo"Thelogfile--"&sourcefile&"hascleanedyourIP!"
Else
WScript.Echo"TheLogfile--"&sourcefile&"hasnotfound!"
Wscript.quit
EndIf
fso.Copyfiledestfile,sourcefile
fso.deletefiledestfile
Setfso=Nothing
ServiceObj.start
SetServiceObj=Nothing


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