Jump to content
Sign in to follow this  

Trying to determine if a box is checked or not

Recommended Posts


I'm trying to make a simple script that will turn off program updates (Java, adobe reader and flash, quicktime, ect), and it works great if every computer is on the same page, but some computers have already had Java update, for instance, disabled. This messes up my script because it assumes it needs to tab through the options and select certain checkboxes/radio buttons.

Is there a way to check if something is enabled already so I can just throw an IF statement in there? I've seen threads about checking the boxes for windows that AutoIt has created, but I'm not sure how to make it work in a regular window... Any suggestions?

Here's my code:

;Disable Adobe Reader Updates
Run("C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe")
WinWaitActive("Adobe Reader")
WinWaitActive("Adobe Reader")
WinClose("Adobe Reader")
;Disable Flash Updates
Run("control C:\Windows\system32\FlashPlayerCPLApp.cpl")
WinWaitActive("Flash Player Settings Manager")
WinClose("Flash Player Settings Manager")
;Disable Java Updates
Run("C:\Program Files\Java\jre6\bin\javacpl.exe")
WinWaitActive("Java Control Panel")
WinWaitActive("Java Update - Warning")
WinWaitActive("Java Control Panel")

Share this post

Link to post
Share on other sites

To determine if a box of another application is checked use:

ControlCommand ("title", "text", controlID, "IsChecked")

Replace "title" and "text" with the corresponding data of the application to automate. The controlID can be determined by the AutoIt WindowInfo tool.

Edited by water

My UDFs and Tutorials:


Active Directory (NEW 2017-04-18 - Version - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version - Download - General Help & Support

ADO - Wiki


Share this post

Link to post
Share on other sites

or you can your the If else statement

if ControlCommand ("title", "text", controlID, "IsChecked") Then
condition here

condition here

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.