Automate Clicking Checkboxes in Any Application*

Introduction

This is a scripting tool using AutoHotkey that simplifies having to click a lot of checkboxes in any software application, particularly when the situation forces you to select a large list of values manually using checkboxes. These instructions provide solutions to two specific situations:

  1. Option 1: Simple Checkbox Selection

    For automating the selection (or deselection) of a specified number of checkboxes. For example, figure 1 displays a discrete list of 18 states with checkboxes. Running the tool provides an option to indicate how many checkboxes to click and is then ran to execute the clicking. This tool is the equivalent of pressing the keystrokes “down arrow then space bar” in a loop. A solution like this is usually preventable when there is a “select all” option available.

    Figure 1. Selecting a specific number of checkboxes
  2. Option 2: Lookup, Then Select Checkbox

    For the automation of looking-up a list of specific values and selecting the checkbox for each one. This is accomplished by 1) the tool entering a discrete value in an application’s search bar, 2) the application pulling up the selectable value, and 3) the tool selecting the checkbox for the value. For example, figure 2 demonstrates how a list of specific states (Arizona, Nevada, Illinois, and Wisconsin) are entered one-by-one into an application that pulls up the value and is then selected.

    Figure 2. Selecting a specific number of checkboxes

*Note:AutoHotkey works only on Windows

Getting Started:

  1. If you do not have it installed already, download and install the current version of AutoHotkey: https://autohotkey.com/download/. Note: AutoHotkey v1.1 is being phased out.


Instructions for Option 1: Simple Checkbox Selection

  1. Click and save the SimpleCheckboxer file linked here anywhere (network drive, desktop, your documents, etc.). For this demonstration, it is recommended placing the file on your desktop.

  2. Simply double-click the SimpleCheckboxer file to load the script


  3. Once the file is loaded, it should be visible in the workstation’s tray


  4. To set the number of specified boxes to check, press this keystroke combo to activate the script: Windows button + b. This “hotkey” will display the “Click Number” box. Enter the number of clicks and press enter.


  5. Once your cursor is in the destination application, press this keystroke combo to activate the script: Windows button + /

  6. Note: The script can be edited by right-clicking the file and selecting “edit file”. There, it is possible to change the speed of the script or change where it starts selecting checkboxes.


  7. When the script completes, it will display a window stated it is finished


  8. If the script needs to be aborted immediately for any reason, just press the escape key (Esc) or right-click the loaded script in your tray and exit

Instructions for Option 2: Lookup, Then Select Checkbox

There are two parts:

Part 1

  1. Create and save the list of values in Microsoft Excel. A sample Microsoft Excel file that has the file name preloaded in the AutoHotkey script is provided (i.e. just add your data to the workbook).
    1. Note, the script will assume there is a header. Otherwise, the AutoHotkey file will need the different file name edited
    2. Note, the values entered into the spreadsheet must match the destination application’s values exactly to lookup cleanly

Part 2

  1. Click and save the CopyandPasterWithCheckboxer file linked here anywhere (network drive, desktop, your documents, etc.). For this demonstration, it is recommended placing the file on your desktop.
  2. Simply double-click the CopyandPasterWithCheckboxer file to load the script
  3. Once the file is loaded, it should be visible in the workstation’s tray
  4. Once your cursor is in the destination application’s search bar, press this keystroke combo (or “hotkey”) to activate the script: Windows button + b
    1. Note: Running the script will open the spreadsheet
  5. The script runs the process until it hits a blank cell. When the script completes, it will display a window stated it is finished.
  6. Note: The script can be edited by right-clicking the file and selecting “edit file”. There, it is possible to change:
    1. the speed of the script
    2. the spreadsheet’s file name
  7. If the script falls off track and needs to be aborted immediately, just press the escape key (Esc) or right-click the running script in your tray and exit

Conclusion

These instructions provide two options for auto-clicking checkboxes using scripting through AutoHotkey. Both options, through editing, can be adjusted to give more flexibility for any special needs. If scripting is optimized for the destination application, this tool should provide increases in productivity when faced with the repetitive task of checking/unchecking many boxes.