Jump to content
Sign in to follow this  
idealist

checkbox state from Windows wizard?

Recommended Posts

idealist

Hi, everyone. Thanks to you all, I am a newbie, but I've already benefited greatly from all the helpful posts on this site.

I am trying to do something that I think is simple, but I haven't been able to find a post on this site about it yet (it probably already exists, I just couldn't find it searching here or via Google).

How do I get the status of a checkbox from a built-in Windows wizard? I'm trying to see if the box is checked or not and uncheck it if it isn't. This will successfully toggle the checkbox:

ControlClick("Add Printer Wizard", "&Automatically detect and install my Plug and Play printer", "[CLASS:Button; INSTANCE:4]")

I don't know, however, how to check to see if the checkbox is checked or unchecked. I tried using ControlGetHandle and GUICtrlRead to no avail (perhaps GUICtrlRead will only work with a GUI that I've spawned).

Thanks for your help.

Edited by idealist

Share this post


Link to post
Share on other sites
wakillon

Try this

$_IsChecked = ControlCommand ( title, text, ControlID, "IsChecked", "" )

title, text, ControlID can be found by Auto Window Info Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites
wakillon

Thanks to you both, ControlCommand did the trick!

Glad to help you ! Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

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.