激活窗口,只写窗口标题前半部分就行
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
'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
发表评论: