Jump to content
Macro Express Forums

Wait For Window....


Jian

Recommended Posts

I’m expecting one of three windows to popup when I running my application. Each has its own control. How do I get the control for the next popup(one of three)?

 

I tried “Wait For Window Title……….”, but didn’t success.

Any way can do it?

 

Thanks.

Link to comment
Share on other sites

So I take it your problem is that you can't Wait for Control because you don't know which is next? And you can't "Wait for Window" because the window title is different in each? As is often the case I don't have enough details to give you a perfect solution but I'll take a stab at it.

 

First off if any part of the Window is common like "Error:1", "Error:2", and "Error:3" you can use Wait for Window using a partial match but if the windows are "Tom", "Dick", and "Harry" then you're SOL with Wait for Window.

 

I suggest using Wait for Window Lose Focus using your program's window title. So Wait for Window Lose Focus for "My Application". Then set a text variable to the topmost window. Then ME can do whatever you want with your control like a mouse click based on logic from the new window title.

 

If T1 = "Tom" click on C1

If T1 = "Dick" click on C2

If T1 = "Harry" click on C3

Else give me an error message

 

Will that work for you?

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