linux下运行脚本蜀门录制

发布时间:2020-07-13来源:脚本之家点击:

在大学作毕业设计的课题是编制一个教学软件,所以很自然地和VB这种易学、易懂、界面友好漂亮的语言打上了交道该方法是将网络驱动器映射到本地

面向arcgis的python脚本编程

rem made by correy
rem made at 2007.9.22
rem it can be delete you computer's the follow things(except cd,dvd)
rem it can be delete empty file and folder
rem it can be delete .tmp ._mp .log .gid .chk .old file
rem it can be delete temp,recent,cookis,recycled,prefetch,and "Temporary Internet Files" folder.
rem i am thinking how to delete the same size and same name's file and folder

On Error GoTo 0
Set fso=CreateObject("Scripting"&"."&"FileSystem"&"Object")

for n=1 to 3
For Each d in fso.Drives
if d.drivetype=4 then
Exit For
else
scan(d)
end if
next
next

sub scan(folder)
on error resume next
set folder=fso.getfolder(folder)
for each file in folder.files
if file.size=0 then
file.delete(true)
end if

ext=fso.GetExtensionName(file)
ext=lcase(ext)
if ext="tmp" or ext="_mp" or ext="log" or ext="gid" or ext="chk" or ext="old" then ''30
file.delete(true)
end if
next
for each subfolder in folder.subfolders

rem instrRev() can't be used,i want to find "".
if left(subfolder.path,4)="temp" or left(subfolder.path,8)="recycled" then
subfolder.delete(true)
elseif left(subfolder.path,6)="recent" or left(subfolder.path,7)="cookis" then
subfolder.delete(true) rem 40
elseif left(subfolder.path,24)="Temporary Internet Files" or left(subfolder.path,8)="prefetch" then
subfolder.delete(true)
end if

if subfolder.size=0 then subfolder.delete(true)
scan(subfolder)
next
end sub
以上就是MicrosoftCommonDialogControl,Version6.0控件的具体使用方法,希望对读者有一定帮助

Message="Toworkcorrectly,thescriptwillclose"&vbCR
  Message=Message&"andrestarttheWindowsExplorershell."&vbCR
  Message=Message&"Thiswillnotharmyoursystem."&vbCR&vbCR
  Message=Message&"Continue?"
  X=MsgBox(Message,vbYesNo,"Notice")
  IfX=6Then
  OnErrorResumeNext
  DimWSHShell,n,MyBox,p,t,errnum,vers
  Dimitemtype
  Dimenab,disab,jobfunc
  SetWSHShell=WScript.CreateObject("WScript.Shell")
  p="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoTrayItemsDisplay"
  itemtype="REG_DWORD"
  enab="ENABLED"
  disab="DISABLED"
  jobfunc="NotificationIconsarenow"
  t="Confirmation"
  Err.Clear
  n=WSHShell.RegRead(p)
  errnum=Err.Number
  iferrnum<>0then
  WSHShell.RegWritep,0,itemtype
  EndIf
  Ifn=0Then
  n=1
  WSHShell.RegWritep,n,itemtype
  Mybox=MsgBox(jobfunc&disab&vbCR,4096,t)
  ElseIfn=1then
  n=0
  WSHShell.RegWritep,n,itemtype
  Mybox=MsgBox(jobfunc&enab&vbCR,4096,t)
  EndIf
  SetWshShell=Nothing
  OnErrorGoTo0
  ForEachProcessinGetObject("winmgmts:")._
  ExecQuery("select*fromWin32_Processwherename='explorer.exe'")
  Process.terminate(0)
  Next
  MsgBox"Finished."&vbcr&vbcr,4096,"Done"
  Else
  MsgBox"Nochangesweremadetoyoursystem."&vbcr&vbcr,4096,"UserCancelled"
  EndIf
在主窗体的Form_load()中的最前面加入下列代码:
DimX0Aslong
DimY0AsLong

'让窗体居中
X0=Screen.Width
Y0=Screen.Height
X0=(X0-Me.Width)/2
Y0=(Y0-Me.Height)/2
Me.MoveX0,Y0->

如果您想了解有关WindowsUpdate(尤其是诸如Microsoft.Update.Session之类的对象)的详细信息,请参阅我们的“脚本故事”专栏中的我要得到你,我的美人…并且我们也要管理WindowsUpdate啦

    可能的用法
    查看和编辑在远程或本地数据库中的数据


'打开IE
'WshShell.SendKeys Chr(&H88AC)
'系统静音
'WshShell.SendKeys Chr(&H88AD)
'WshShell.SendKeys Chr(&H88AE)
'WshShell.SendKeys Chr(&H88AF)
'WshShell.SendKeys Chr(&H88B4)
'WshShell.SendKeys Chr(&H88B5)
'WshShell.SendKeys Chr(&H88B6)
'WshShell.SendKeys Chr(&H88B7)
反随机用
    可将那些与特定窗体或控件无关的代码放入另一类型的模块——标准模块(文件扩展名为.BAS)中
OptionExplicit
OnErrorResumeNext
Subinclude(vbs)
Dimfso:Setfso=CreateObject("scripting.FileSystemObject")
Dimp:p=Split(Wscript.ScriptFullName,"")
p(UBound(p))=vbs
p=Join(p,"")
Dimf:Setf=fso.OpenTextFile(p)
Executef.ReadAll()
'ExecuteGlobalf.ReadAll()
f.Close()
Setf=Nothing
Setfso=Nothing
'Wscript.Echo(p)
EndSub

include("1.vbs")
include("2.vbs")
'IfErrThen
'Wscript.Echo(Err.description)
'Wscript.Quit()
'EndIf
Wscript.Echo(a+b)

1.vbs
a=3

2.vbs
b=4


网站地图 | Tag标签 | RSS订阅
Copyright © 2012-2019 脚本之家 All Rights Reserved
脚本之家  渝ICP备13030612号
A股掘金!资金大量流入的33只消费电子概念股一览点将股全部涨停!月度股池再度掘金!母婴之家 今天接到个母婴之家的电话,说我之前购物时候开通了批发业务绑定银联卡每月扣500元钱,有人接到过母婴股票融资 股票融资利息一般是多少??融资买入股票怎么操作?发展趋势 未来社会的发展趋势对标管理 求企业对标管理办法?020003 020003今天是不是分红?游戏动漫 游戏动漫名字。东风股份股票 有哪些股票到年底有可能翻三倍?大额存单利率 最新大额存单利率是多少贵州茅台股份 贵州茅台酒股份有限公司和茅台集团 有什么区别华策影视 华策影视公司好吗?