激活窗口,只写窗口标题前半部分就行
2019-8-2 乱云飞 评论(0) 浏览(629) 标签: 批处理 VBS 激活窗口
Set WshShell = CreateObject("WScript.Shell")WshShell.AppActivate "任务管理"
WshShell.SendKeys "{Enter}"
-------------------------------------------------------------------
'<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<激活窗口
Private Sub jihuo()
Set www = CreateObject("wscript.shell") '-------------------定义shell
Shell "cmd.exe /c echo Set www = CreateObject(""WScript.Shell""):www.AppActivate ""EZSOFT"">%TEMP%\app.vbs", vbHide
Shell ("cmd /c %temp%\app.vbs"), vbHide '//激活窗口
End Sub
'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>