Hi,
I use
invoke-expression to call a command to extract a big file, which will
take about 30 seconds to complete. When the extraction completed, a
window will pop up, and I need to click the OK button in it in order to close the window and let me script going on. Currently
what I did is, use invoke-expression to extract the file, sleep 60
second, then I suppose the pop up window has been shown on the screen,
so I use kill command to kill the process. My question is, how can I
check the existence of the window with a specified window title (or windows class)? If I
can check the existence of the window, then I will don't need to wait 60
seconds, i just need to continuously check the existence of the window,
if it appear(which mean the extraction completed), then I can kill the
process safely. Hope you guys can give some suggestions.
Thank you!