Use error handling methods For example ... first part of your script goes here ... OnErrorGoto NOT_FOUND WindowFind ... OnErrorStop ... here goes logic for the found window Exit NOT_FOUND: ... if we get here, the window can not be found : I have a script that uses the WindowFind command to activate a window. When : the window dosen't exist the script errors out and stops running. Is there : a way to check for the window first before running the WindowFind command : so it dosen't terminate the script.
|