Sign in to follow this  
Followers 0
iwanttoautomate

Return value of checked/unchecked checkbox with ControlCommand

3 posts in this topic

Hi guys,
I'm glad to be here on AutoIT forums with you. I'm a new guy in automation world and I am really happy finding AutoIT. I would like you to help me with getting the return value of checked/ unchecked checkbox state.

; Run Internet Explorer
Run("C:\Program Files\Internet Explorer\iexplore.exe")
Sleep(2000)
; Will open Tools -> Internet Options (General tab by default)
Send("!Xo")

Now there I want to make AutoIT to identify if "Delete browsing history on exit" checkbox is checked or not
Using AutoItV3 Window Info tool, it says that "Delete browsing history on exit" checkbox is: Class - Button, Instance - 7 (not sure if this is specific)
In case of identifying if checkbox is checked or not I would use "ControlCommand" function, right?
So I would like to you guys help me with this. If "delete history" checkbox is checked(=1) then click on "Delete..." button if NOT checked(=0) click on "Settings" button

Thanks in advance

 

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Try this:

ControlCommand("Internet Options","General","[CLASS:Button; INSTANCE:7]","IsChecked","")

The help file is your best friend.

Edited by Palestinian

Share this post


Link to post
Share on other sites

Thank you Palestinian for your quick and correct reply.
 

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