Jian Posted May 4, 2007 Report Share Posted May 4, 2007 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. Quote Link to comment Share on other sites More sharing options...
Cory Posted May 5, 2007 Report Share Posted May 5, 2007 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? Quote Link to comment Share on other sites More sharing options...
Jian Posted May 7, 2007 Author Report Share Posted May 7, 2007 Thanks lot, Cory, Got through smoothly by your guide. Jian Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.