Forum Discussion
joe_2
10 years agoContributor
VBScript snippet:
<command to close the app here>
Do While Sys.WaitProcess("ApplicationName", 1000).Exists = True
Delay(1000,"Waiting for the application to close")
Loop
<commands for whatever comes next here>
When it finishes that loop, the application is closed.
If you feel the need, you can add a counter to the loop, and declare an error if it gets too big, to detect a hung app at shutdown.
As-is, though, this will just sit there looping until it doesn't detect the application, then it will exit the loop.
Each time through the loop lasts a second, approximately.
Related Content
- 10 years ago
- 14 years ago
- 12 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 6 days ago