Jump to content
Macro Express Forums

Repeat Until A Window Doea Not Appear


koden

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???

Link to comment
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...

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...