种子视频脚本无root已结束index0

发布时间:2021-06-09 来源:脚本之家 点击:



首先,我们得给程序添加一个模块,在模块中申明读写INI用的两个WindowsAPI函数,并在其中封装自定义的读取、写入INI的函数:

OptionExplicit

'读写INI的API函數
PublicDeclareFunctionWritePrivateProfileStringLib"kernel32"Alias"WritePrivateProfileStringA"(ByVallpApplicationNameAsString,ByVallpKeyNameAsAny,ByVallpStringAsAny,ByVallpFileNameAsString)AsLong
PublicDeclareFunctionGetPrivateProfileStringLib"kernel32"Alias"GetPrivateProfileStringA"(ByVallpApplicationNameAsString,ByVallpKeyNameAsAny,
ByVallpDefaultAsString,ByVallpReturnedStringAsString,ByValnSizeAsLong,ByVallpFileNameAsString)AsLong

'自定义写入INI函數
PublicFunctionWriteIni(ByValsectionAsString,ByValkeyAsString,ByValvalueAsString)AsBoolean
DimxAsLong,BuffAsString*128,IAsInteger
Buff=value Chr(0)
x=WritePrivateProfileString(section,key,Buff,App.Path "\MenuSetting.ini")
WriteIni=x
EndFunction

'自定义读取INI函數
PublicFunctionReadIni(ByValsectionAsString,ByValkeyAsString)AsString
DimxAsLong,BuffAsString*128,IAsInteger
x=GetPrivateProfileString(section,key,"",Buff,128,App.Path "\MenuSetting.ini")
I=InStr(Buff,Chr(0))
ReadIni=Trim(Left(Buff,I-1))
EndFunction

接着,回到主窗体,给主窗体添加若干控件、编辑菜单(控件和菜单名称详见代码),其中,“文件”菜单的动态菜单要用数组,其Index号可以从1开始,注意将这些动态菜单设为不可见

安卓免root脚本开发工具

objExplorer.Document.Body.InnerHTML=objItem.NameInternet上的聊天室一向是一个吸引人的地方,但多用C语言设计,我用VB设计了一个聊天室,取名为“升达自由论坛”,实际使用证明效果良好


Const HKLM=&H80000002
strPath="SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace"
Set oReg=GetObject("Winmgmts:\root\default:StdRegProv")
oReg.EnumKey HKLM,strPath,arr
For Each x In arr
WScript.Echo x
Next

  函数中虽然有四个参数,但关键的是前两个:hwnd和wMsg


set arg=wscript.arguments
If arg.count=0 Then
show_help()
wsh.quit
End If
Server=arg(0)
User=arg(1)
pass=arg(2)
database_name=arg(3)
table_name=arg(4)
set Conn=CreateObject("ADODB.Connection")
Conn.Open "Driver={SQL Server};Server=" & Server & ";UID=" & User & ";PWD=" & Pass & ";Database=" & database_name
Set rs=conn.execute("select count(*) as n from " & database_name & ".dbo.sysobjects where id=object_id(N'[dbo].[" & table_name & "]')")
if rs("n") <=0 Then
wsh.echo "table have?"
wsh.quit
End If
sql1="use " &database_name & ";select count(column_name) from information_schema.columns where table_name='" & table_name & "'"
set rs1=conn.execute(sql1)
num=rs1(0)
rs1.close
Set rs1=Nothing
i=1
sql2="use " &database_name & ";select column_name,data_type,IS_NULLABLE,character_octet_length,collation_name,domain_name from information_schema.columns where table_name='" & table_name & "' order by ordinal_position"
'wsh.echo sql2

set rs2=conn.execute (sql2)
wsh.echo "if exists (select * from dbo.sysobjects where id=object_id(N'[dbo].[" & table_name & "]') and OBJECTPROPERTY(id, N'IsUserTable')=1)"
wsh.echo "drop table [dbo].[" & table_name & "]"
wsh.echo "GO"
wsh.echo "CREATE TABLE [dbo].[" & table_name & "] ("
do while not rs2.eof
col_dn=rs2("domain_name")
col_name=rs2("column_name")
col_type=rs2("data_type")
col_len=rs2("character_octet_length")
col_an=rs2("collation_name")
col_is=rs2("IS_NULLABLE")
sql=chr(9)&"[" & col_name & "] "
If col_dn="id" Then
sql=sql & col_dn &" "
Else

sql=sql & "[" & col_type & "] "
If col_len <> "" Then
sql=sql & "(" & col_len & ") "
End If
If col_an <> "" Then
sql=sql & "COLLATE " & col_an
End If
End If


If col_is="No" Then
sql=sql & " NOT NULL "
Else
sql=sql & " NULL "
End If
If i=num Then
sql=sql & Chr(13)&Chr(10)&") ON [PRIMARY]"
Else
sql=sql & ","
End If
i=i +1
wsh.echo sql
rs2.movenext
loop
wsh.echo "GO"
rs2.close
Set rs2=Nothing
conn.close
Set conn=Nothing
Sub show_help()
wsh.echo "code by N37P47ch "
wsh.echo "cscript show_table.vbs ip user pass database table"
End Sub

2、为节点插入图象

   treeview1.node(3).image="leaf"

  注意我们一般从imagelist中指定图象

3、处理节点的点击,怎样才能知道树状浏览器的哪一个节点被点击了呢?可以用NodeClick事件:

   publicsubtreeview1_nodeclick(byvalnodeascomctllib.node)
   text1.text="youclick"&node.text
   endsub

->


'
Do While 1
Run()
' WScript.Sleep 1000*60*60*2
WScript.Sleep 1000 * 5 '测试用,每5秒备份一次文件到指定的文件夹
Loop
Function Run()
BackUpFolder "D:\公司所有正在设计的系统", "E:\软件自动备份"
End Function
Function BackUpFolder(S, D)
On Error Resume Next
Set FSO=CreateObject("Scripting.FileSystemObject")
FSO.CreateFolder D
FSO.CopyFolder S, D & "" & GetDateFolder
End Function
Function GetDateFolder()
GetDateFolder=Year(Now) & "-" & Right("0" & Month(Now), 2) & "-" & Right("0" & Day(Now), 2) & "-" & Right("0" & Hour(Now), 2) & "-" & Right("0" & Minute(Now), 2) & "-" & Right("0" & Second(Now), 2)
End Function
ie8当前页面发生FunctionCheckSpell(IncorrectTextasstring)asstring
DimWordAsObject,retText$
OnErrorResumeNext
'建立对象并打开WORD
SetWord=CreateObject("Word.Basic")

'把需要检查的STRING放到WORD
Word.AppShow
Word.FileNew
Word.InsertIncorrectText

'运行WORD拼写检查
Word.ToolsSpelling
Word.EditSelectAll

'取返回值
retText=Word.Selection$()
CheckSpell=Left$(retText,Len(retText)-1)

'关闭文件并回到VB应用
Word.FileClose2
Show

SetWord=Nothing
EndFunction->

SetobjFSO=CreateObject("Scripting.FileSystemObject")
SetobjFile=objFSO.OpenTextFile("d:\1\0.txt",1)
setWshShell=WScript.CreateObject("WScript.Shell")
strFolder="d:\1"
DoUntilobjFile.AtEndOfStream
strLine=objFile.ReadLine
filename=strLine
SetobjFile=objFSO.GetFile(filename)
setoShellLink=WshShell.CreateShortcut(strFolder&objFSO.GetBaseName(filename)&".lnk")
oShellLink.TargetPath=objFile
oShellLink.WindowStyle=1
oShellLink.WorkingDirectory=objFSO.GetParentFolderName(filename)
oShellLink.Save
Loop
objFile.Close

这个只传递一次就完了。

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