koden Posted May 2, 2007 Report Share Posted May 2, 2007 This function I use a lot. But is it right that this function checks that the window name is in front but not if the full window is up? In my programs this hapens: The window comes in front, but some of the window is stil hanging and is coming 1 sek. later. Is there a function that can wait until the whole window is finished with updating? Quote Link to comment Share on other sites More sharing options...
Cory Posted May 2, 2007 Report Share Posted May 2, 2007 This is a common problem. Wait for Window works great assuming there is no lag. What you want is a Wait for Window Ready but it doesn't exist and I'm sure the boys at Insight have technical reasons why this can't be done or they would have done it by now. In the beginning I put a Pause in after the Wait for Window. But this is not an elegant solution. Adobe Acrobat, which I use a lot, when doing large batches will load the File Save As dialog box instantly 90% of the time. But once in a while, probably due to network congestion, it hangs for a good second or more. But if I put in a 2 second delay every time my macro will take hours to complete. What to do? My solution has been to use the Wait for Control instead of Wait for Window in these cases. Often I am using the “OK” or “Save” button in the macro so it’s already defined. What I have found is that the program will not activate most of the buttons until it is ready so it makes complete sense to Wait for Control to Become Enabled. After all, that’s what you really want, isn’t it? How are things in Denmark? It was Denmark, wasn't it? 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.