My mother always said, "A lazy man always finds a better way." And so it came to pass that I found myself in exactly that situation.
I was building up an old 486 computer for use on my bench for programming computer boards and robots that I make. I had a 2 Gigabyte drive that I took out of some other piece of scrap computer and was elated that I had such a big drive in my junk box. (This was written around 2000 when this was a big drive!)
When I formatted the drive, the computer reported bad clusters on the surface and directed me to run Scandisk, a utility to fix such errors. I ran the utility for about 10 minutes when it flagged me about a bad sector it was going to mark off so it wouldn't be used again. I responded to the dialogue box with a key-press to indicate I accepted the fix proposed. Immediately, the program came up with another bad sector, obviously adjacent to the first bad one. Again I responded so the program would "fix" it.
This was going to be a sllllllooooooowwwww process because every sector was being checked and there are 8 sectors/cluster, so about Â½ a million clusters on the drive! After 100 keypress- acknowledgements I quit. There had to be a better way.
I took a thermocouple from my bench, put it in the vise and twisted the thermocouple down so it would press on the key for me! Whenever a sector was repaired, the held-down key would automatically dismiss the dialog box and fix the sector! Neat huh?
(I once did this at a customer work-site where I had to load 600 graphic pages, acknowledging each with a press of the return key. I automated that one by jamming a pencil between the key and the keyboard frame. An hour or so later, the keyboard buffer filled up and the keyboard beeped like crazy, but no harm was done and all my graphics were loaded.)
Alas. After about 6000 fixes on my hard drive, the computer memory filled up and wouldn't let me continue. When I restarted the Scandisk program, it stopped at the first bad sector AGAIN and wanted to fix it AGAIN! This was not going to work. So much for my invention.
Okay, more parts for my scrap bin. Those are sure strong magnets on the head servo.