Tentaal Posted June 24, 2008 Posted June 24, 2008 (edited) Hello, I do not understand why my Controlclick doesnt work anymore. ControlClick ( "Sélection des composants", "", "[CLASS:Button;INSTANCE:3]") WinWaitActive("KEYFREE") ControlClick ( "KEYFREE", "", "[CLASS:Button;INSTANCE:2]"); working ControlClick ( "KEYFREE", "", "[CLASS:Button;INSTANCE:4]"); working (click Next) ControlClick ( "KEYFREE", "", "[CLASS:Button;INSTANCE:4]"); works sometimes (supposed to click Next) ControlClick ( "KEYFREE", "", "[CLASS:Button;INSTANCE:1]"); does not not work anymore WinWaitActive("Question") ControlClick ( "Question", "", "[CLASS:Button;INSTANCE:1]") If a manually go to the Question Windows the script continue its job normally. I'm sure about de CLASS and INSTANCE settings. Any help? Thanks! Edited June 24, 2008 by Tentaal
Zedna Posted June 24, 2008 Posted June 24, 2008 Try: ControlFocus ( "Sélection des composants", "", "Button3") ControlClick ( "Sélection des composants", "", "Button3") Resources UDF ResourcesEx UDF AutoIt Forum Search
newbiescripter Posted June 24, 2008 Posted June 24, 2008 (edited) Try put some sleep(5000) between the controlclicks and see if it works then. If it works then we just need to make something like this: Do Sleep(100) Until ControlCommand("KEYFREE","","[CLASS:Button;INSTANCE:4]","IsVisible", "") == 1 Or Do Sleep(100) Until ControlGetText("KEYFREE","","[CLASS:Button;INSTANCE:4]") == "The thing stands and the button" Between the controlclicks that change the window so it doesn't go to fast.. Regards Edited June 24, 2008 by newbiescripter
newbiescripter Posted June 24, 2008 Posted June 24, 2008 (edited) sleep() gives goo result. Thanks.Great then you just have to optimize it so it doesn't waste time on sleeping 5seconds when it only need a half. you could use the methods I showed you with do sleep() until. Regards Edited June 24, 2008 by newbiescripter
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