I always thought about doing this, but since class signups only opened twice a year (once per semester), and that was the same time I needed to actually sign up for the classes, I concluded there would never be a time to debug and refine such a script.
Say you're waiting for something on a website to become available. I'd look for some language on the page about availability that's likely to change when available. I don't know what they're going to change it to, but I know that it'll (probably change). I set up a script to run every few minutes to check that particular spot on the page. If it changes, I get an email.
Maybe I got an email when it changed from 'unavailable' to 'available soon', but that's okay, that means it'll definitely work when it's available for real.
There's always a chance that it won't work, but if you can reasonably assert what is likely to change, it's very easy to monitor it.
So, I didn't need to debug what happens when the class shows "open" - I just saved the div that said "closed" and sent myself an email/text any time it didn't say exactly that.
You basically had to just send the correct number of arrow key presses to get the cursor to the correct field, send the digits, and then send the enter key. Parse the data that comes back, and add the routine to cursor over to the "add course" prompt when it says there is an availability. The script was totally gross looking but it worked.
In short, you gave the school a list of the classes you wanted to take. The school loaded everybody's information into the computer and had it make the first set of assignments. Then you got back the schedule and discovered that the computer had put you in classes at 7AM, 11AM, 4PM, and 6PM MWF and only one class on TTh so you had to go in and shuffle your classes around until you got a reasonable schedule. Or you would discover that all of your electives filled up before you had a chance so now you're in a fight to get into the classes.
It sounds all Mad Max, but the schedules were in such flux that it was usually possible to get the classes you wanted. I only remember getting screwed once, on a mandatory class with only two or three timeslots and one of which was highly undesirable (7AM MWF) and the other two timeslots never had an opening. Worse, the professor for that class had a heavy accent and tended to drone slowly in a monotone.
Back then people would also oversignup to classes then leave them after the first few class days of it didn’t work with schedule/etc.