Jump to content

Need Help to Uncheck a Checkbox


Wolfy
 Share

Recommended Posts

First you need to use the "AutoIt Window Info" tool to get the window and object name/s you want to interact with.

then you do something like:

ControlClick("Print","","[CLASS:Button;INSTANCE:8]","LEFT",1)

to check a box if it is unchecked, or uncheck a box if it is checked.

"Print" is the name of the window

[CLASS:Button;INSTANCE:8] is the object (checkbox)

"LEFT" is the mouse click

1 is how many times to click the mouse.

Should be a good start.

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

If you are automating the entire install, then you could simply have your script "[TAB]" over to the check box, then press space.

Thank you for responding. I follow what you are describing but what I don't understand is how to script the space that clears the checkbox.
Link to comment
Share on other sites

the Send function:

Send("{TAB}{TAB}{TAB}{TAB} ") ; 4 tabs and a space

If you do it that way, would it not be easier to do

Send("{TAB 4} ")?

I use AutoIt for some pdf printing and I've found that the tab does not always start in the same spot so it would end in the wrong location and "space" the wrong checkbox.

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

If you do it that way, would it not be easier to do

Send("{TAB 4} ")?

I use AutoIt for some pdf printing and I've found that the tab does not always start in the same spot so it would end in the wrong location and "space" the wrong checkbox.

actually i didn't realize you could do that, i had only glanced at the help file to get the command for tab (i don't develop in autoit, just dabble, mainly for personal use)

Link to comment
Share on other sites

  • Developers

The preffered way is to use ControlCommand("TITLE", "text", ControlID,"UnCheck", "") command in stead of Send.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...