You could script HTTP receipt and response with nc(1), or probably more easily with net/curl. As each hotspot's implementation will be different, you may have to have multiple scripts for multiple sites.

nc(1) has no dependencies, net/curl depends on devel/gettext, devel/libidn, and to the best of my recollection their dependency chains do not include java. For scripting curl, there are perl, python, and Tcl interfaces.

What you need to do is look at the structure of the URL sent back to the server in response to clicking "Accept" as that is how the server is notified that you accept whatever conditions/limitations they enforce.

I'm going to recommend you use Google, Bing or whatever your favorite Internet search engine is and search with two keywords: "curl" and "hotspot". The top hit on Google recommend a specific curl script that you could copy/paste for command line based web-browser-push-button scripting.

Personally, I don't do any of this when I use public access WiFi. I just use a browser.