
The task
The client had a job that came back every month: several hundred messages from a table, each to be sent separately, with a record of what went out. A service that sends SMS over the internet was not an option — the messages had to leave from their number, from their phone, and through their own mobile plan.
That leaves one road only: an application that does what a person would do by hand, in a browser, but without the person.
Why that is harder than it looks
A program driving someone else's web application has no contract with it. There is no API guaranteeing that tomorrow works like today, no error message it can rely on, no promise that the text field and the send button will stay where they are. All such a program has is the screen — the same one the user sees.
Three problems follow from that, and they are the work:
- Waiting. A web application does not announce that it is ready. A program starting too early types into a field that does not exist yet, and a program waiting a fixed five seconds per message spends half an hour on a list that takes ten minutes.
- Breaking off halfway. If the connection drops on the hundred and fiftieth message, the job must neither be abandoned nor started over. So the record of what was sent does not live in the program's memory but in the table itself, row by row, at the moment of sending — which means a restart continues where it stopped.
- Pairing the device. The web version of the messages works only while the phone is paired with the computer, and that pairing needs a person. So that one step was deliberately left to the user, and everything else runs without them.
How it was solved
A Windows desktop application that walks the browser through the steps the user would take by hand, using the table both as its input and as its record. Everything that can change in someone else's web application — field names, buttons, waiting times — was moved out of the program and into settings, so a change on their side means editing one setting rather than shipping a new version.
Before the first send the application checks whether the environment is ready and, if it is not, says what is missing — because an error reported before the start is worth far more than an error in the hundred and fiftieth row.
What the client got
A job that used to take a working afternoon now takes as long as the sending itself, and the record of what went out and when is created along the way instead of being kept afterwards. The solution has since been polished into a finished product, sold under send SMS from Excel.
When it was done
Third quarter of 2024.
Leave a Comment