IfWindowOpen and WaitWindowClosed

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Reimon
Pro Scripter
Posts: 55
Joined: Wed Mar 31, 2004 4:46 pm

IfWindowOpen and WaitWindowClosed

Post by Reimon » Tue May 22, 2007 8:17 pm

Hello !!!

I use IfWindowOpen and WaitWindowClosed to control the script. I have the problem when by means of another IfWindowOpen I want to control to the opening of another window but the script it is stopped in the previous WaitWindowClosed.

For example, I hope that the user opens a window with IfWindowOpen and I wait, with WaitWindowClosed, for the entry of information until it closes the window.

I also attempt control that he click a button and opens a certain window between IfWindowOpen and WaitWindowClosed to control this new window with IfWindowOpen, but this sometimes works and sometimes not.

Some idea?

Greetings,

Reimon

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Wed May 23, 2007 10:26 pm

This script works with Notepad and google.com. Run the script below and open a Notepad window and leave it open, next load google.com and close the Google page when you get the message that google is open. Finally close the Notepad window to return to WindowIsNotOpenLoop.

Code: Select all

Label>WindowIsNotOpenLoop
  Wait>0.05
  IfWindowOpen>Notepad*,WindowIsOpen
Goto>WindowIsNotOpenLoop

Label>WindowIsOpen
  MessageModal>Notepad Open
Label>WindowIsOpenLoop
  Wait>0.05
  IfWindowOpen>Google*,GoogleIsOpen
  IfWindowOpen>Notepad*,WindowIsOpenLoop
  MessageModal>Notepad Closed
Goto>WindowIsNotOpenLoop

SRT>GoogleIsOpen
  MessageModal>Google Open%CRLF%Close Google window and click OK
END>GoogleIsOpen
I hope this was helpful.

Rain

Reimon
Pro Scripter
Posts: 55
Joined: Wed Mar 31, 2004 4:46 pm

Very Thanks

Post by Reimon » Mon May 28, 2007 3:10 pm

Rain,

Very Thanks.

Greetings,

Reimon

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts