Bottom line: I wrote an Applescript that automates clicking a lot of evenly spaced checkboxes in a web browser.
Sometimes you run across really long forms where you just want to check the same box on all of them. That’s about the only thing this script can do.
As I’ve noted in the script itself, it seems to be working okay in the latest stable releases of Safari and Chrome for Mac (as of Sep 07, 2012). I’ve tried to have the dialogue boxes give clear instructions as the script runs.
I wrote this because I was recently filling out an online form where I had to check boxes to select which programs I want to download. I was limited to downloading 100 of them, there were ~180 total, and there was no “select all” button (seriously). Even if there were, I’d have to de-select 80… no good.
Most of you likely know that you can go between buttons on a web page by pushing “tab,” and you can toggle checkboxes by hitting “space.” In this particular form, you had to hit tab twice between each button. This form had several pages with a similar layout, though some of them only required one tab between buttons. So instead of hitting “tab tab space” 100 times for each page, I wrote this script. It needs you to input about how many buttons you need to check, and how many “tabs” are between each button, then select what browser you’re using out of a list of running processes. Then it tries to “tab tab space” for you.
I’ve tried to make this clear, but please be careful using this script. The last thing I’d want is for somebody to get the spacing wrong or enter in too many checkboxes and have this script go all the way to the bottom of the page and submit some important form that wasn’t ready yet. Keep this possibility in mind, and use at your own risk.
That said, here are a few tips for success. This script
- will prompt you to position the starting point by tabbing down to the first checkbox and checking it with the spacebar.
- takes this manually checked box into account in the total, so just enter in how many boxes you want to be checked at the end of each cycle.
- does fine starting back up where it left off, so I recommend guessing low if you’re unsure of how many boxes you have to check on a page. If it doesn’t get them all, just tab down and start again from the next box.