VBS检查窗口是否打开

时间:2012-08-22 23:08:47

标签: vbscript

我正在寻找vbscript可以检查特定命名窗口是否打开然后运行以下内容的过程。

objShell.SendKeys(“^ {w}”)

我还是新手,所以任何帮助都会受到赞赏。

谢谢!

1 个答案:

答案 0 :(得分:0)

快速回答是看看:

Const TimeToAllowActivationToComplete = 250 ' YMMV so experiment
WshShell.AppActivate "Put Window Title Here"
Wscript.Sleep TimeToAllowActivationToComplete
WshShell.SendKeys "^{w}"

另请参阅“vbscript appactivate sendkeys”上的网络搜索,其结果如下:

ASP Free Forums > System Administration > Windows Scripting VBScript - SendKey to Application in APPActivcate

PC Tools Scripting Home > > WScript Methods SendKeys Method