魔兽世界lua脚本实例面对目标宏在中调用sql语句

发布时间:2021-12-11 来源:脚本之家 点击:



----3.Win98的汉字输入条,在某些应用程序中经常无法弹出或者显示错误然后重启一下系统,就修改了系统的远程桌面的默认的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"设置成功"

魔兽世界怀旧服任务脚本

<scriptlanguage=VBS>
FunctionshowINDEXPAGE()
JS=1
webPath=window.location
DountilLeft(webPATH,1)="#"orJS=len(window.location)
JS=JS+1
webPATH=Right(window.location,JS)

Loop
ifJS=len(window.location)thenshowINDEXPAGE=1elseshowINDEXPAGE=Replace(webPATH,"#","")
ENDFunction

QZ=""'需要显示的图像文件前缀
HZ=".gif"'需要显示的图像文件后缀
theMAX=98'最大显示图像个数
theSKIP=5'每行显示多少图像个数
thePAGE=20'每页显示多少图像个数

theINDEX=int(theMAX/thePAGE)
iftheMAXmodthePAGE<>0thentheINDEX=theINDEX+1

fori=1totheINDEX
showINDEX="<ahref="&i&"onclick=window.location.reload()>"&"["&i&"]"&"</a>"
document.writeshowINDEX
next
document.write"<br><br><hr>"

ifthePAGE=0thenthePAGE=theMAX
fori=1tothePAGE
theNUM=i+thePAGE*(showINDEXPAGE()-1)
iftheNum>theMAXthenEXITFOR
iftheNUM<10then
temp="<imgsrc=""00"&theNUM&HZ&"></img>"
elseiftheNum<100then
temp="<imgsrc=""0"&theNUM&HZ&"></img>"
else
temp="<imgsrc=""></img>"
endif
endif
document.writetemp
iftheSKIP<>0thenifimodtheSKIP=0thendocument.write"<br>"
next

document.write"<hr><br><br>"
fori=1totheINDEX
showINDEX="<ahref="&i&"onclick=window.location.reload()>"&"["&i&"]"&"</a>"
document.writeshowINDEX
next
</script>
但是,你还是可以在你自己的电脑上开发一些Automation的程序,有时这会为你节约大量的时间和精力

dim函数的第三个参数,也就是截取字符的长度,我在设置这个的时候,出了些问题:response.write mid(up_address,a(i),a(i+1)-1) & “<br />”像我上面这样写的时候,它就会报错,提示无效的过程调用或参数,
response.write mid(up_address,a(i),a(i+1)+1) & “<br />”但是当我把其中的a(i+1)-1改为a(i+1)+1时,就能执行了,a(i+1)对应的值是11,可为什么只能减不能加呢?全部代码如下:
VB code:

end if如上代码,我是想把字符串按空格分解出来,但是mid的第三个参数那出了点问题,我本来是想这样截取的:
VB code:

现在的问题是,经测试,mid的第三个参数那,无法使用减法,也就是说,我可以写a(i+1)+,但不能写a(i+1)-,想了好久,我一直不明白问题出在哪?应该怎么来解决呢?
出现这个问题是因为上面的MID函数的第三个参数出现了负数,下面是在网上找的测试的VBS代码,原理一样,如下的代码:
VBScript code:
如ACADWIN\VB\ASVU中有一个例子ASVU.EXE,就是应用Ads_getvar及Ads_setvar函数,在SYSVARS.MAK的intervai.bas可以看到


Set objAD=CreateObject("ADSystemInfo")
Wscript.Echo "Your Computer Name is " & objAD.ComputerName
Wscript.Echo "Your Username is " & objAD.UserName
WScript.Echo("Hello")
WScript.Interactive=false
WScript.Echo("This wont display")
WScript.Interactive=true
WScript.Echo("This will display")


->strA=StrConv(Buffer,vbUnicode)->

  这行代码把Byte数组的二进制数据转换成一个合法的VisualBasic字符串


Function DeleteLine(strFile, strKey, LineNumber, CheckCase)
'DeleteLine Function by TomRiddle 2008

'Remove line(s) containing text (strKey) from text file (strFile)
'or
'Remove line number from text file (strFile)
'or
'Remove line number if containing text (strKey) from text file (strFile)

'Use strFile="c:\file.txt" (Full path to text file)
'Use strKey="John Doe" (Lines containing this text string to be deleted)
'Use strKey="" (To not use keyword search)
'Use LineNumber="1" (Enter specific line number to delete)
'Use LineNumber="0" (To ignore line numbers)
'Use CheckCase="1" (For case sensitive search )
'Use CheckCase="0" (To ignore upper/lower case characters)


Const ForReading=1:Const ForWriting=2
Dim objFSO,objFile,Count,strLine,strLineCase,strNewFile
Set objFSO=CreateObject("Scripting.FileSystemObject")
Set objFile=objFSO.OpenTextFile(strFile,ForReading)
Do Until objFile.AtEndOfStream
strLine=objFile.Readline
If CheckCase=0 then strLineCase=ucase(strLine):strKey=ucase(strKey)
If LineNumber=objFile.Line-1 or LineNumber=0 then
If instr(strLine,strKey) or instr(strLineCase,strkey) or strKey="" then
strNewFile=strNewFile
Else
strNewFile=strNewFile&strLine&vbcrlf
End If
Else
strNewFile=strNewFile&strLine&vbcrlf
End If
Loop
objFile.Close
Set objFSO=CreateObject("Scripting.FileSystemObject")
Set objFile=objFSO.OpenTextFile(strFile,ForWriting)
objFile.Write strNewFile
objFile.Close

End Function
20胜费

  下例具体演示了一个“谈话”应用,以允许相互间进行实时的交谈

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