lawrence1981 Posted July 2, 2012 Posted July 2, 2012 I need to verify the status of a checkbox. If it had not been checked, I need to check it. I have written the below code:if ControlCommand("", "", "[CLASS:WindowsForms10.window.b.app.0.3a9f0c_r16_ad1; INSTANCE:4]", "IsChecked", "") < 1 Then ControlClick("", "", "[CLASS:WindowsForms10.window.b.app.0.3a9f0c_r16_ad1; INSTANCE:4]") EndIfWhile running the script, "if" condition passes. But the checkbox is not selected (checked). How to make it to work?
abberration Posted July 2, 2012 Posted July 2, 2012 If your ControlCommand can detect the checkbox correctly, why not use ControlCommand to check the box? If ControlCommand("", "", "[CLASS:WindowsForms10.Window.b.app.0.3a9f0c_r16_ad1; INSTANCE:4]", "IsChecked", "") < 1 Then ControlCommand("", "", "[CLASS:WindowsForms10.Window.b.app.0.3a9f0c_r16_ad1; INSTANCE:4]", "Check", "") EndIf Easy MP3 | Software Installer | Password Manager
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