VBS 自动打开软件


VBS 自动打开软件   点击 软件   关闭进程方法!

Dim WshShell, QQPath                            
                                    

QQPath="C:\TM ACv6\TMAC.exe" '需要打开的软件路径
Set WshShell=WScript.CreateObject("WScript.Shell") 
path = Chr(34) & QQPath & Chr(34) '去除路径空格
WshShell.Run path,1

WScript.Sleep 10000  '等待1秒钟
WshShell.sendkeys "%{ESC}"      '选中当前路径的界面             
WshShell.AppActivate "Technitium MAC Address Changer v6 - by Shreyas Zare"  '需要激活的软件框标题名称
WshShell.sendkeys "{enter}"

WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{ENTER}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{ENTER}" 
WScript.Sleep 3000 
WshShell.SendKeys "{ENTER}" 
WScript.Sleep 3000 
CreateObject("WScript.Shell").Run "taskkill /f /im TMAC.exe", 0   'TMAC.exe  为需要关闭的进程名称
 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM