python 编程 安卓脚本_shell编写python脚本汉化安卓油猴下载

DeclareFunctionSendMessageLib"user32"Alias"SendMessageA"(ByVal

hwndAsLong,ByValwMsgAsLong,ByValwParamAsLong,lParamAsAny)

AsLong

PublicConstCB_FINDSTRING=&H14C

PrivateSubCombo1_Change()

DimiStartAsInteger

DimsStringAsString

StaticiLeftOffAsInteger

iStart=1

iStart=Combo1.SelStart

IfiLeftOff<>0Then

Combo1.SelStart=iLeftOff

iStart=iLeftOff

EndIf

sString=CStr(Left(Combo1.Text,iStart))

Combo1.ListIndex=SendMessage(Combo1.hwnd,B_FINDSTRING,-1,ByValCStr(

Left(ombo1.Text,iStart)))

IfCombo1.ListIndex=-1Then

iLeftOff=Len(sString)

combo1.Text=sString

EndIf

Combo1.SelStart=iStart

iLeftOff=0

EndSub

静态变量iLeftOff指定了字符长度

Ans=InPutBox("请输入要执行的操作:1.加密,2.解密,3.退出

查询设计器不但包含可视地显示查询的图形窗格,也包含显示查询的SQL文本的SQL窗格

如果搜索应用于整个字符串,Global属性的值为True,否则其值为False例如:

DimdbsAsDatabase

DimdocTempAsDocument

DimprpTempAsProperty

Setdbs=OpenDatabase(''dbtemp.m4b``)

SetdocTemp=dbs.Containers(''Modules'').DocuFunctions'')

SetprpTemp=docTemp.Createproperty(''KeepLocdbText,''T'')

docTemp.Properties.AppendpWTemp

dbs.Close

上面的程序把KeepLocal属性附加到Documeni对象的properties集合中去

"

Else

objFSO.CreateFolder targetpath & Right(path,Len(path)-Len(sourcepath))

Set folder=objFSO.GetFolder(path)

Set files=folder.files

For Each file in files

targetfile=targetpath & Right(path,Len(path)-Len(sourcepath)) & "" & file.name & ".zip"

Set fp=objFSO.OpenTextFile(targetfile,2,True)

fp.Write Chr(80) & Chr(75) & Chr(5) & Chr(6) & String(18,0)

fp.Close

oApp.Namespace(targetfile).CopyHere path & "" & file.name

WScript.Sleep 1000

Next

Set subfolder=folder.subfolders

For Each sfolder in subfolder

GetSourceFile path & "" & sfolder.name

Next

End If

End Function

Set objFSO=CreateObject("Scripting.FileSystemObject")

Set oApp=CreateObject("Shell.Application")

sourcepath="C:\Documents and Settings\Administrator\桌面\Watermarks"

targetpath="D:\temp"

GetSourceFile sourcepath

Set objFSO=Nothing

Set oApp=Nothing

在Windows下编程,经常发现有不少功能Windows系统已经做了,如果能够直接调用,就可省去不少程序的编写,并能提高程序的运行效率

谢谢关注用你在逗我吗

要安装和访问HierarchicalFlexGrid控件

1.在“工程”菜单中,选择“部件”dimIISCount,IISObject,logfiledir,fso,LogFilePeriods,inputtime,site,sites,i,j,sitename(999),WshShell

'onerrorresumenext

setWshShell=WScript.CreateObject("WScript.Shell")

Setfso=CreateObject("scripting.FileSystemObject")

setIISCount=GetObject("")

sites=0

foreachsiteinIISCount

if(site.class="IIsWebServer")then

sitename(sites)=site.name

sites=sites+1

endif

next

MsgBox"IIS中一共"&sites&"个站点,ID分别为:"

forj=1tosites-1

MsgBoxsitename(j)

next

inputtime=inputbox("您要备份哪天的日志?如备份2004-01-01,则输入040101")

MsgBox"备份"&inputtime&"天的日志"

MsgBox"开始备份.............."

fori=0tosites-1

SetIISOBJect=GetObject(""&sitename(i))

MsgBox"备份ID="&sitename(i)&"Sitename="&IISObject.servercomment&"的站点"

logfiledir=IISObject.LogFileDirectory&"w3svc"&sitename(i)'设置第一个站点的日志路径

if(Err.Number<>0)thenlogfiledir=IISCount.LogFileDirectory

Err.clear

'ifIISObject.LogFilePeriod=1thenLogFilePeriods="days"

'ifIISObject.LogFilePeriod=2thenLogFilePeriods="weeks"

'ifIISObject.LogFilePeriod=3thenLogFilePeriods="months"

'ifIISObject.LogFilePeriod=4thenLogFilePeriods="hours"

'ifIISObject.LogFilePeriod=0ANDIISObject.LogFileTruncateSize=-1thenLogFilePerirods="onefile"

'ifIISObject.LogFilePeriod=0ANDIISObject.LogFileTruncateSize>0thenLogFilePerirods="size"&IISObject.LogFileTruncateSize

LogFilePeriods=IISObject.LogFilePeriod

if(Err.Number<>0)thenLogFilePeriods=IISCount.LogFilePeriod

Err.clear

if(NOTLogFilePeriods=1ANDNOTLogFilePeriods=4)then

MsgBox"对不起,您的日志偶就不给备份,咋地吧"

WScript.quit

endif

if(NOTfso.folderexists("d:backup"))then

MsgBox"thefolderd:backupisnotexist,nowcreateit"

fso.CreateFolder("d:backup")

Msgbox"createdd:backupsuccuful"

endif

if(NOTfso.FolderExists("d:backup"&IISObject.servercomment))then

MsgBox"thefolderd:backup"&IISObject.servercomment&"isnotexist,nowcreateit"

fso.CreateFolder("d:backup"&IISObject.servercomment)

MsgBox"createdd:backup"&IISObject.servercomment&"succuful"

endif

MsgBox"nowbackupthelogfiles"

logfiledir=WshShell.ExpandEnvironmentStrings(logfiledir)'将环境变量转换成字符串

MsgBoxlogfiledir

fso.Copyfilelogfiledir&"ex"&inputtime&"*","d:backup"&IISObject.servercomment

ifErr.number<>0then

MsgBox"thissitenofiles"

else

MsgBox"backuplogfilessuccuful"

endif

inputifdel=inputbox("是否删除已备份文件?输入“YES”进行删除")

ifinputifdel="YES"then

fso.DeleteFile(logfiledir&"ex"&inputtime&"*")

MsgBox"删除文件成功"

else

MsgBox"文件已保留"

endif

next

MsgBox"备份所有的日志文件成功,嘿嘿"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值