Over
here I found something that might work.
I used it like this to close an application....
Set objShell = CreateObject("WScript.Shell")
If
objShell.AppActivate("Document - WordPad") Then
objShell.SendKeys "%%{F4}" ' send Alt+F4 (Exit for Wordpad
Builder.LogMessage "- Found WordPad open on that document: Document and closed it! --"
Else
Builder.LogMessage "- WordPad is not currently open on that document: Document! --"
End If
But I think you can simply do a loop around the
AppActivate call untiil the app is no longer active in a subsequent script step.