Jump to content
Macro Express Forums
koden

Repeat Until A Window Doea Not Appear

Recommended Posts

I have an error window that sometimes come up when opening a file.

"My IF error window is running command" then click OK to the error and press arrow down and open next file.

Error window again and ok a.s.o.

 

But somewhere there is no error window an the macro should go on.

 

But can i in the command "Repeat until" tell the repeat that, when no error window is coming, then stop the repeat function???

Share this post


Link to post
Share on other sites

Can't follow that one, sorry! Guess you'd need to post some code and explain more carefully if I was to have a chance of helping...

 

--

Terry, West Sussex, UK

Share this post


Link to post
Share on other sites

Consider something like this:

 

Repeat Start (Repeat 30 times)

  // or your own (currently working) error window detection mechanism

  Variable Set String %T90% from Window Title

  If Variable %T90% = "Error"

    // you might try to press Enter rather than click OK

    Text Type: <ENTER>

    // break out of the repeat loop

    Break

  End If

  Delay 0,1 Seconds

Repeat End

 

The disadvantage is the obligation to wait a while (3 seconds) whether the Error popup appears...

Share this post


Link to post
Share on other sites

Another answer might be to wait for either window. The macro will move forward when either window gets focus. If it's the "Main" window then you would do one thing. If it's the "Error" window then something else is done.

Delay 1 Seconds
Wait For Window Title: "Main"
  OR
Wait For Window Title: "Error"
If Window Title "Main" is on top
  ... do something
Else
  ... do something else
End If

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×