A Useful Windows Tool

Recently at work, I was given a task that involved a lot of data analysis; specifically, curve fitting. A lot of data was collected, and it needed to be fitted to the predictions to check agreement. Normally something like this would be easy to automate for efficiency at the Linux command line, but there is a horrendous piece of in-house Windows software that was written to perform this task. Sure it has a pretty GUI, but other than that it is agonizing to use. The proper thing to do would be to rewrite it, but the next test cycle had already arrived. The utility was written in Visual Basic, and it was thousands of lines, spread across multiple files. I estimate that it could be written in python, in a few hundred, with a much more usable end product.

The downfall of this in-house software is that it requires a lot of point/click, search for a file, point/click again, search for another file, click a button, copy/paste the output to a text file.

My options for this job:

  1. Go through this painfully manual process for dozens of datasets, and probably get carpal-tunnel syndrome.
  2. Figure out some way to automate the point/click, copy/paste part of the task.

After about 10 seconds into a Google search, I found AutoHotkey. It was the perfect tool for this particular job. Within about an hour reading through the manual, I had crafted a template that could be used for each dataset, automating all of the point/click, copy paste. I then wrote a simple script to duplicate the template, filling it in with the specifics of each dataset. Et voila! Done. This approach dramatically cut down the time and effort required to analyze the data, and also eliminated all the errors that are bound to happen when doing manual, repetitive tasks.

Comments !