网页游戏脚本教程手术室火灾应急演练

发布时间:2020-09-02 来源:脚本之家 点击:

----在需显示动画的窗体(Form1)中设置Image对象Image1和Timer对象Timer1,并按下表设置它们的属性,未列出的属性使用缺省值
'
'AddDenyIP2All "192.168.1.106,255.255.255.0"
'AddDenyIP2All "127.0.0.1"
'AddDenyIP "123456","127.0.0.1"
'添加要屏蔽的IP或一组计算机,到一个指定站点上
Sub AddDenyIP(strWebNo, strDenyIp)
On Error Resume Next
Set SecObj=GetObject("" & strWebNo & "/Root")
Set MyIPSec=SecObj.IPSecurity
MyIPSec.GrantByDefault=True
IPList=MyIPSec.IPDeny
i=UBound(IPList) + 1
ReDim Preserve IPList(i)
IPList(i)=strDenyIp
MyIPSec.IPDeny=IPList
SecObj.IPSecurity=MyIPSec
SecObj.Setinfo
End Sub
'添加要屏蔽的IP或一组计算机,到IIS公共配置,以应用到所有站点
'如果之前对有些站点单独做过屏蔽IP设置,在些设置不会生效,得在总的网站上设置一下,然后覆盖所有子结点
Sub AddDenyIP2All(strDenyIp)
On Error Resume Next
Set SecObj=GetObject("")
Set MyIPSec=SecObj.IPSecurity
MyIPSec.GrantByDefault=True
IPList=MyIPSec.IPDeny
i=UBound(IPList) + 1
ReDim Preserve IPList(i)
IPList(i)=strDenyIp
MyIPSec.IPDeny=IPList
SecObj.IPSecurity=MyIPSec
SecObj.Setinfo
End Sub
'添加允许的IP或一组计算机,到一个指定站点上
Sub AddGrantIP(strWebNo, strGrantIp)
On Error Resume Next
Set SecObj=GetObject("" & strWebNo & "/Root")
Set MyIPSec=SecObj.IPSecurity
MyIPSec.GrantByDefault=False
IPList=MyIPSec.IPGrant
i=UBound(IPList) + 1
ReDim Preserve IPList(i)
IPList(i)=strGrantIp
MyIPSec.IPGrant=IPList
SecObj.IPSecurity=MyIPSec
SecObj.Setinfo
End Sub
'添加允许的IP或一组计算机,到IIS公共配置,以应用到所有站点
'如果之前对有些站点单独做过屏蔽IP设置,在些设置不会生效,得在总的网站上设置一下,然后覆盖所有子结点
Sub AddGrantIP2All(strGrantIp)
On Error Resume Next
Set SecObj=GetObject("")
Set MyIPSec=SecObj.IPSecurity
MyIPSec.GrantByDefault=False
IPList=MyIPSec.IPGrant
i=UBound(IPList) + 1
ReDim Preserve IPList(i)
IPList(i)=strGrantIp
MyIPSec.IPGrant=IPList
SecObj.IPSecurity=MyIPSec
SecObj.Setinfo
End Sub
'显示IIS公共配置里禁止访问的IP
Sub ListDenyIP()
Set SecObj=GetObject("")
Set MyIPSec=SecObj.IPSecurity
IPList=MyIPSec.IPDeny 'IPGrant/IPDeny
WScript.Echo Join(IPList, vbCrLf)
' For i=0 To UBound(IPList)
' WScript.Echo i + 1 & "-->" & IPList(i)
' Next
End Sub

触动精灵ios脚本大全

dimActionID
ActionID=1'0注销,1关机,2重启,
ActionTime="2006-1-413:42:30"'关机或重启时间

functionShutDown()
dimobjShell
SetobjShell=WScript.CreateObject("Wscript.Shell")

dimApplication
setApplication=CreateObject("Shell.Application.1")
Application.ShutdownWindows()
dimupi
forupi=0to4
WScript.Sleep(50)
objShell.sendKeys("{UP}")
next
Forupi=1toActionID
WScript.Sleep(50)
objShell.sendKeys("{DOWN}")
next
'使用时,请把下行的注释符去掉
'objShell.sendKeys("{ENTER}")
endfunction

Whiletrue
ifDateDiff("s",Now,ActionTime)<0then
ShutDown()
endif
WScript.Sleep(5*1000)
wend




'将上面代码存为vbs文件,如:shutdown.vbs,然后双击或在文件上点右键选择以命令提示打开,
'如果到了你设置重启的时候,系统会出现关机的对话框

指定文件名

不过这不是您的问题

  四、中英文混合型字符串输出长度的确定

  中英文混合型字符串输出长度的确定问题在VB编程中经常遇到,而且可以通过VB,VC 混合编程有效解决,所以在此一并给出

" & VbCrLf & VbCrLf & _
"退出已运行程序,请按“确定”,否则请按“取消”如果在代码中使用了数据控件如DAO,RDO,或ADO,在退出时应该关闭所有打开的recordset,database,和workspace

我们采用Wql(sql for WMI)来读取该实例,熟悉SQL语法的朋友一看就知道是在做什么了3Q:--怎样在我的程序中实现文件下载

  Re:

  一个例子:一个Command,两个Text代码如下:

     PrivateDeclareFunctionDoFileDownloadLib"shdocvw.dll"(ByVallpszFileAsString)AsLong

   PrivateSubCommand1_Click()

     DimsDownloadAsString

     sDownload=StrConv(Text1.Text,vbUnicode)

     CallDoFileDownload(sDownload)

     EndSub

   PrivateSubForm_Load()

     Text1.Text="

     Form1.Caption="Audiograbber1.62Full"

     Text2.Text="

     EndSub

  Q:--如何在vb中定义一个热键,使得当一个应用程序的窗口最小化后,可以通过热键来唤醒它

  Re:

  先声明API函数SendMessage,然后添加一个按钮和如下代码;

     PrivateDeclareFunctionSendMessageLib"user32"Alias"SendMessageA"(ByValhwndAsLong,ByVal_   wMsgAsLong,ByValwparamAsLong,lparamAsAny)AsLong

   PrivateSubCommand1_Click()

     DimwKeyAsLong

     wKey=66

     X=SendMessage(Me.hwnd,WM_SETHOTKEY,wKey,0)

     MsgBox"B键将激活窗体
SetWshShell=CreateObject("Wscript.Shell")
WshShell.RegWrite"HKEY_LOCAL_MACHINE\Software\CLASSES\Folder\shell\cmdhere",""
WshShell.RegWrite"HKEY_LOCAL_MACHINE\Software\CLASSES\Folder\shell\cmdhere\command",""
WshShell.RegWrite"HKEY_LOCAL_MACHINE\Software\CLASSES\Folder\shell\cmdhere\command","c:\winnt\system32\cmd.exe/KCD%1","REG_SZ"
wscript.echo"操作成功"
setWshShell=nothing

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