Hello, again... we've discussed this module for some time now, I've suggested in the past that you read the documentation. The WaitWindowLike method sounds more suitable for your use case:
WaitWindowLike($parent,$wndtitle,$wndclass,$wndid,$depth,$wait)
Function which allows one to wait for a window to appear vs. using har
+d waits (e.g. sleep 2).
parent - Where to start (parent window)
wndtitle - Regexp for the window title
wndclass - Regexp for the window class name
wndid - Numeric Window or Control ID
depth - How deep should we search before we stop
wait - How many seconds should we wait before giving up
Note the last line. So once again, please take the time to read and understand the documentation for the tools you choose to use.