idealist Posted September 28, 2010 Share Posted September 28, 2010 (edited) 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 September 28, 2010 by idealist Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted September 28, 2010 Share Posted September 28, 2010 Hi and Welcome to the forums! GUICtrl**() is only for other GUICtrlCreate*() stuff from the same script. You should try ControlCommand() .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
wakillon Posted September 28, 2010 Share Posted September 28, 2010 Try this$_IsChecked = ControlCommand ( title, text, ControlID, "IsChecked", "" )title, text, ControlID can be found by Auto Window Info AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
idealist Posted September 28, 2010 Author Share Posted September 28, 2010 Thanks to you both, ControlCommand did the trick! Link to comment Share on other sites More sharing options...
wakillon Posted September 28, 2010 Share Posted September 28, 2010 Thanks to you both, ControlCommand did the trick!Glad to help you ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now