Jump to content
Sign in to follow this  
timmyc

ControlClick on button once it is active (previously greyed out)

Recommended Posts

timmyc

Hey all,

I am trying to automate an install of several applications. At the moment i have mousemove and control click commands set on a sleep timer but the time in between clicks may vary depending on what's happening in the background and the PC speed etc

SO...instead of sleep, mousemove then controlclick is there a way to tell it to click on the button only when it becomes active.

For example in an install screen it does its "Calculating space requirements" and when finished the Next button goes from greyed out to active. Thats when i want to click it rather than waiting for the sleep delay.

Thanks

Tim

Share this post


Link to post
Share on other sites
stormbreaker

Something like:

Do
Sleep(100)
Until ControlCommand("Run", '', "[TEXT:OK]", "IsEnabled") = 1
ControlClick("Run", "", "[TEXT:OK]")


----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Share this post


Link to post
Share on other sites
timmyc

Thanks all, Used a combo of controlcommand and mouseclick

Again yall very helpful!

Thanks

Tim

Share this post


Link to post
Share on other sites
JLogan3o13

Just out of curiosity, if ControlCommand works for you to wait for the button to be enabled, why not then use ControlClick as MKISH suggested above? I guarantee you will find it more reliable than a mouseclick.


√-1 2^3 ∑ π, and it was delicious!

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  

×