ezzetabi Posted July 23, 2004 Share Posted July 23, 2004 I made a script for automating printing of lots of documents, but after some testing I had the feeling that sometime Autoit was waiting for a window closing when ControlClick SHOULD already clicked, clicking manually the script contined with no problem. Without thinking too much I changed the script that way: While 1 ControlClick("classname=#32770", "Nothing to print.", "Button1") $ERROR = WinWaitClose("classname=#32770", "Nothing to print.", 5) If $ERROR Then ExitLoop Wend;Creating a loop that check if the window disappear in 5 seconds, if not ;reclicking the OK button. But testing again I saw that the problem may also been in a other window that appear unpredicably and that may have stole the click... So I wonder. Now that I solved this strange window appearance, can I safely remove this loop that "reclick" if the window do not understood? Or it may actually happen that the program do not see the click Autoit sent it? Link to comment Share on other sites More sharing options...
sugi Posted July 23, 2004 Share Posted July 23, 2004 This is only guess... but AutoIt doesn't wait for the control to become "clickable" when the control doesn't yet exist. So maybe AutoIt was too fast and tried to execute the click when the window or control did not exist yet? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now