you have some ways...
think the easiest (that doesn't involve files) way is checking the window title.
it's not 100% sure way, but most likely suites your needs.

now, checking the title... there are many ways and the simplest is to do:
Code:

while setfocus("the desired window title") sleep 1 loop


"loop exited, window is open at that location."
_________________________
!

download KiXnet