Jump to content
Sign in to follow this  
Think7

Clicking button only when it becomes active.

Recommended Posts

Think7

Hello

I'm new to AutoIt scripting, so please have some patience. This is probably a silly question, but i have not been able to find the answer elsewhere.

I am trying to automate CCleaner cleaning the registry of my PC. CCleaner does not provide a command line parameter to do this. You can only open CCLeaner with the registry cleaning section of te application displayed.

I have attached a screenshot of the CCleaner application. The problem is the "Fix Selected Issues" button is greed out until you have scanned for issues. You can not click the button until it has scanned.

Without using a timer, how would i do this?

How do you select a specific button based on the buttons text and not simply using a keyboard shortcut like !Y, etc?

http://img291.imageshack.us/img291/2508/screenshot20100707at102.jpg

Edited by Think7

Share this post


Link to post
Share on other sites
Negative1

Hello

I'm new to AutoIt scripting, so please have some patience. This is probably a silly question, but i have not been able to find the answer elsewhere.

I am trying to automate CCleaner cleaning the registry of my PC. CCleaner does not provide a command line parameter to do this. You can only open CCLeaner with the registry cleaning section of te application displayed.

I have attached a screenshot of the CCleaner application. The problem is the "Fix Selected Issues" button is greed out until you have scanned for issues. You can not click the button until it has scanned.

Without using a timer, how would i do this?

How do you select a specific button based on the buttons text and not simply using a keyboard shortcut like !Y, etc?

Hello,

Have you tried the Autoit Window info tool?

Start the tool then mouse over the mentioned button. Press ctrl+alt+f without moving the mouse... then select the window info tool and see if the "control" subtab has and ID number for the control. It may or may not depending on how the CCleaner languange. If it does have and ID you can use many autoit functions to get the status of the control and click the control:

ControlCommand("Window Title","", ControlID,"IsEnabled","")

^^^^^ returns 1 if the control is enabled.

ControlClick("Window Title","", ControlID,"Primary",1)

^^^^^ clicks the control once with the primary mouse button "left" for normal window op "right" for swapped left handers.

hope this helps

-1


What are we going to do tonight Brain?Same thing we do every night Pinky try to automate the world.

Share this post


Link to post
Share on other sites
Think7

i have tried using these functions in my script, obviously changing the window info etc and it doesn't seem to work.

I think the issue is that it doesn't check repeatedly that the button is active. I think maybe there should be a loop or an if statement but im not sure.

I'm very used to simple batch files. AutoIt is very complicated for a n00b such as myself.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.