koden Posted February 21, 2007 Report Share Posted February 21, 2007 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??? Quote Link to comment Share on other sites More sharing options...
terrypin Posted February 21, 2007 Report Share Posted February 21, 2007 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 Quote Link to comment Share on other sites More sharing options...
wbeldman Posted February 21, 2007 Report Share Posted February 21, 2007 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... Quote Link to comment Share on other sites More sharing options...
pgmacros Posted February 21, 2007 Report Share Posted February 21, 2007 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 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.