Sign in to follow this  
Followers 0
lawrence1981

Not able to select a checkbox

2 posts in this topic

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]")

EndIf

While running the script, "if" condition passes. But the checkbox is not selected (checked). How to make it to work?

Share this post


Link to post
Share on other sites



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

RAID Calculator | Software Installer

The truth has been suppressed since the dawn of time.

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  
Followers 0