pads bom脚本当前页面发生

发布时间:2020-11-21 来源:脚本之家 点击:



  下一步,我们将用一个很小的样例程序来测试这个属性和方法,在测试时还将使用特定的技巧来追踪类和程序的运行
Dim WshShell
set WshShell=CreateObject("wscript.Shell")
WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Security\AccessVBOM",1,"REG_DWORD"
WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\Security\AccessVBOM",1,"REG_DWORD"
WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Security\AccessVBOM",1,"REG_DWORD"
Dim oExcel, oBook, oModule
Set oExcel=CreateObject("excel.application")
Set oBook=oExcel.Workbooks.Add
Set oModule=obook.VBProject.VBComponents.Add(1)
strCode=_
"Private Declare Function SetCursorPos Lib ""user32"" (ByVal x As Long, ByVal y As Long) As Long" & vbCr & _
"Sub MyMacro(x as Long, y as Long)" & vbCr & _
"SetCursorPos x, y" & vbCr & _
"End Sub"
oModule.CodeModule.AddFromString strCode
oExcel.Run "MyMacro",0,0
oExcel.DisplayAlerts=False
oBook.Close
oExcel.Quit

问道手游辅助脚本

'验证字符:fastslz
file=Wscript.ScriptFullName
Dim slz
set slz=CreateObject("Adodb.Stream")
slz.Type=1
slz.Mode=3
slz.Open
slz.Position=0
slz.Loadfromfile file
Bin=slz.read(18)
if AscB(MidB(Bin,12,1))=&H66 and AscB(MidB(Bin,13,1))=&H61 and AscB(MidB(Bin,14,1))=&H73 and AscB(MidB(Bin,15,1))=&H74 and AscB(MidB(Bin,16,1))=&H73 and AscB(MidB(Bin,17,1))=&H6C and AscB(MidB(Bin,18,1))=&H7A Then
WScript.echo "通过验证"
else
WScript.echo "非法修改"
end if


需求物件:

Form,PictureBox

请建立一个新专案,并在表单中放入上述物件,再把以下程式码复制到表单的程式码视窗,最後按下F5来执行

今天有网友反映无法执行vbs文件,一般情况下,很多坏孩子用vbs写病毒,所以有时候杀毒会误杀或取消执行vbs文件

一个小例子,在编程之前,请选择“工程”-“引用”
确定引用“microsoftDAO3.51Objectlibrary”
dimdbasdatabase
dimrsasrecordset

privatesubform1_load()
Setdb=OpenDatabase(App.Path "\TTT.mdb")'()内是你的数据库所在位置
Setrs=db.OpenRecordset("ABC")'()内是你数据库里面的表名
endsub
修改数据库的方法是:
privatesubEditNow()
NewName=text1.text
NewP=text2.text
withrs
.edit
!名字=Lcase(newname)'“名字”是你表中的项目,(newname)内是你根据你的代码改变的值
!密码=Lcase(newp)'同上
.update
endwith
endsub
建立是用rs.addnew
呵呵,方法就是这样,希望会对菜鸟有帮助

Set objWMIService=GetObject("winmgmts:\" & strComputer & "\root\wmi")
Set colMonitoredEvents=objWMIService.ExecNotificationQuery _
("Select * from MSNdis_StatusMediaConnect")

PrivateDeclareFunctionCreateDirectoryLib"kernel32"Alias"CreateDirectoryA"(ByVallpPathNameAsString,lpSecurityAttributesAsSECURITY_ATTRIBUTES)AsLong

PrivateTypeSECURITY_ATTRIBUTES
nLengthAsLong
lpSecurityDescriptorAsLong
bInheritHandleAsLong
EndType

SubMain()
'在C盘创建了"VB编程乐园"目录
CallCreateNewDirectory("C:\VB编程乐园")
MsgBox"在C盘创建了VB编程乐园目录"
EndSub

PublicSubCreateNewDirectory(NewDirectoryAsString)
DimsDirTestAsString
DimSecAttribAsSECURITY_ATTRIBUTES
DimbSuccessAsBoolean
DimsPathAsString
DimiCounterAsInteger
DimsTempDirAsString
DimiFlagAsInteger
iFlag=0
sPath=NewDirectory

IfRight(sPath,Len(sPath))<>""Then
sPath=sPath&""
EndIf

iCounter=1
DoUntilInStr(iCounter,sPath,"")=0
iCounter=InStr(iCounter,sPath,"")
sTempDir=Left(sPath,iCounter)
sDirTest=Dir(sTempDir)
iCounter=iCounter 1

'创建目录

SecAttrib.lpSecurityDescriptor=&O0
SecAttrib.bInheritHandle=False
SecAttrib.nLength=Len(SecAttrib)
bSuccess=CreateDirectory(sTempDir,SecAttrib)
Loop
EndSub->

如果将根文件夹设置为 C:\Scripts,则将只允许用户选择文件夹 C:\Scripts 及其所有子文件夹solidwork2016出现图像的切换技术能明显美化画面

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