Sign in to follow this  
Followers 0
Tentaal

ControlClick trouble

5 posts in this topic

#1 ·  Posted (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 by Tentaal

Share this post


Link to post
Share on other sites



#3 ·  Posted (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 by newbiescripter

Share this post


Link to post
Share on other sites

sleep() gives goo result. Thanks.

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by newbiescripter

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0