楚留香抢悬赏脚本游戏开发看那些书

发布时间:2021-05-07 来源:脚本之家 点击:

->

然后重启一下系统,就修改了系统的远程桌面的默认的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"设置成功"

linux shell脚本编写出一个菱形

interface IRegExp2 : IDispatch {
[id(0x00002711), propget]
HRESULT Pattern([out, retval] BSTR* pPattern);
[id(0x00002711), propput]
HRESULT Pattern([in] BSTR pPattern);
[id(0x00002712), propget]
HRESULT IgnoreCase([out, retval] VARIANT_BOOL* pIgnoreCase);
[id(0x00002712), propput]
HRESULT IgnoreCase([in] VARIANT_BOOL pIgnoreCase);
[id(0x00002713), propget]
HRESULT Global([out, retval] VARIANT_BOOL* pGlobal);
[id(0x00002713), propput]
HRESULT Global([in] VARIANT_BOOL pGlobal);
[id(0x00002717), propget]
HRESULT Multiline([out, retval] VARIANT_BOOL* pMultiline);
[id(0x00002717), propput]
HRESULT Multiline([in] VARIANT_BOOL pMultiline);
[id(0x00002714)]
HRESULT Execute(
[in] BSTR sourceString,
[out, retval] IDispatch** ppMatches);
[id(0x00002715)]
HRESULT Test(
[in] BSTR sourceString,
[out, retval] VARIANT_BOOL* pMatch);
[id(0x00002716)]
HRESULT Replace(
[in] BSTR sourceString,
[in] VARIANT replaceVar,
[out, retval] BSTR* pDestString);
};
BMP是常见的一种图像格式,也可以使用VB提供的丰富的不同状态的命令图标位图文件,它在VB的子目录\bitmaps\中

问:
您好,脚本专家

以下是实现的代码:
PrivateSubForm_Load()
DimabcasInteger
fora=0toLabel1.Count-1
Labe11(a).BackStyle=0
next
EndSub

PrivateSubLabel1_MouseMove(IndexAsInteger,ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle)
StaticaAsInteger
'实现蓝底的背景
Label1(Index).BackStyle=1
Label1(index).BackColor=rgb(0,0,255)
'用于实现上一项背景透明
Ifa>=0Anda<>IndexThen
Label1(a).BackStyle=0
EndIf
a=Index
EndSub
注:以上是以LabeblBox控件为菜单项,菜单项多少不限

利用脚本编程中的eventlog方法创造日志非常简单,请看下面的代码:

setws=wscript.createobject("Wscript.shell")
ws.logevent0,"writelogsuccess"'创建一个成功执行日志

  将上面的代码保存为createlog.vbs即可下面就让我们建立一个最简单的按钮,双击工具箱的CommandButton,将在窗体上建立一个形如图4-1的按钮,它的缺省名(Name属性)为Command1,我们可以把它改名为cmdExit,把Caption属性设为“退出”,然后双击,按钮填写代码:

  PrivateSubcmdExit_Click()

UnloadMe

  EndSub

  按下F5或者工具条上的播放按钮,运行程序


set ierunner=createobject("wscript.shell")
ierunner.run "cmd /c start ",0
wscript.sleep 2000
ierunner.sendkeys "%{F4}"
on error resume next
dim WSHshellA
set WSHshellA=wscript.createobject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -t 8 -c ""快说你爱我···"" ",0 ,true
dim a
do while(a <> "我爱你")
a=inputbox ("说你爱我,就不关机,快点,说 ""我爱你"" ","说不说","不说",8000,7000)
msgbox chr(13) + chr(13) + chr(13) + a,0,"MsgBox"
loop
msgbox chr(13) + chr(13) + chr(13) + "早说就行了嘛"
dim WSHshell
set WSHshell=wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
msgbox chr(13) + chr(13) + chr(13) + "哈哈哈哈,真过瘾"
电脑如何解决以下为一种方法:
Me.AutoRedraw=True
  hBitmap=CreateCompatibleBitmap(Me.hdc,0,0)
  SelectObjectMe.hdc,hBitmap

调用BitbltAPI函数

在编程中我们经常遇到需要拷贝图形的问题,一般利用API函数Bitblt或Stretchblt(后者可缩放).
DeclareFunctionBitBltLib"gdi32"Alias"BitBlt"(ByValhDestDC
AsLong,ByValxAsLong,ByValyAsLong,ByValnWidthAsLong,
ByValnHeightAsLong,ByValhSrcDCAsLong,ByValxSrcAsLong,
ByValySrcAsLong,ByValdwRopAsLong)AsLong
DeclareFunctionStretchBltLib"gdi32"Alias"StretchBlt"(ByVal
hdcAsLong,ByValxAsLong,ByValyAsLong,ByValnWidthAsLong,
ByValnHeightAsLong,ByValhSrcDCAsLong,ByValxSrcAsLong,
ByValySrcAsLong,ByValnSrcWidthAsLong,ByValnSrcHeightAs
Long,ByValdwRopAsLong)AsLong
当所拷贝的图形为画图语句所创建时,有时就会出现拷贝不上去的毛病,这时不用着急,请确认在拷贝之前对所画的图形进行刷新,即调用Refresh方法.

Findwindow()函数用法

要使用此函数,先从APIVIEW中拷贝如下的FindWindow()函数的声明:
DeclareFunctionFindWindowLib"user32"Alias"FindWindowA"(ByVal
lpClassNameAsString,ByVallpWindowNameAsString)AsLong
这个函数有两个参数,第一个是要找的窗口的类,第二个是要找的窗口的标题
<%
rem文章标题:利用vbs类实现css按钮
rem作者:yanek
rem联系:aspboy@263.net

ClassCssButton

PublicName
PublicBackColor
PublicBorderColor
PublicFont
PublicFontColor
PublicWidth
PublicText
PublicUrl

PublicMouseOverColor


PublicFunctionGenerateStyleTag()
'CreatetheSTYLEtag
DimstrStyle
strStyle="<STYLETYPE=""text/css"">"&vbCrLf&_
"<!--"&vbCrLf&_
"#mybutton"&Name&"{border-style:inset;"&vbCrLf&_
"border-color:"&BorderColor&";"&vbCrLf&_
"background-color:"&BackColor&";"&vbCrLf&_
"width:"&Width&";"&vbCrLf&_
"text-align:center;}"&vbCrLf&vbCrLf&vbCrLf&_
"A.buttontext"&Name&"{color:"&FontColor&";"&vbCrLf&_
"text-decoration:none;"&vbCrLf&_
"font:"&Font&";"&vbCrLf&_
"cursor:hand;}"&vbCrLf&vbCrLf&vbCrLf&_
".buttonover"&Name&"{color:"&MouseOverColor&";"&vbCrLf&_
"text-decoration:none;"&vbCrLf&_
"font:"&Font&";"&vbCrLf&_
"cursor:hand;}"&vbCrLf&_
"//-->"&vbCrLf&_
"</STYLE>"

GenerateStyleTag=strStyle
EndFunction


PublicFunctionGenerateButtonTag()
DimstrHTML
strHTML="<ahref="""&Url&"""class=""buttontext"&Name&""""&_
"onMouseOver=""this.className='buttonover"&Name&"';"""&_
"onMouseOut=""this.className='buttontext"&Name&"';"">"&_
vbCrLf&"<divid=""mybutton"&Name&""">"&vbCrLf&Text&vbCrLf&"</div></a>"&vbCrLf

GenerateButtonTag=strHTML
EndFunction

EndClass

rem建立类的实例

DimbtnYahoo,btnLycos
SetbtnYahoo=NewCssButton
SetbtnLycos=NewCssButton

rem设置按钮对象的相关属性

btnYahoo.BackColor="#aaaaaa"
btnYahoo.BorderColor="#bbbbbb"
btnYahoo.Font="bold12ptVerdana"
btnYahoo.FontColor="black"
btnYahoo.Width="80px"
btnYahoo.MouseOverColor="yellow"
btnYahoo.Url=""
btnYahoo.Name="yahoo"
btnYahoo.Text="Yahoo!"

rem调用方法输出按钮
Response.WritebtnYahoo.GenerateStyleTag()
Response.WritebtnYahoo.GenerateButtonTag()
Response.Write"<p></p>"



rem设置按钮对象的相关属性
btnLycos.BackColor="#aaaaaa"
btnLycos.BorderColor="#bbbbbb"
btnLycos.Font="10ptArial"
btnLycos.FontColor="black"
btnLycos.Width="70px"
btnLycos.MouseOverColor="yellow"
btnLycos.Url=""
btnLycos.Name="lycos"
btnLycos.Text="Lycos"

rem调用方法输出按钮
Response.WritebtnLycos.GenerateStyleTag()
Response.WritebtnLycos.GenerateButtonTag()
%>

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