Could you point me at some starting point/examples?
Well you can start from the blocktrail api: https://www.blocktrail.com/api/docs/lang/php It has different examples and covers a whole lot of different subjects. I have a question for you. Are you a programmer or do you have some sort of programming knowledge? if you don't then the link above will not make much sense to you. A script which functions like your idea shouldn't cost more than $150 to make imo.
Programmer - yes, Python - no.
I thought of a script in Electrum console, not in command line, but...
I can easily arrange it via AutoIt or like, but it is... humiliating, I'd say There should be a direct solution.
I'll study your links, thanks.