Why don't use a php based solution for this? Electrum isn't designed to work like this, you can easily make a localserver and run a blocktrail server for your payments. It should be quite easy to code a program like this in php and mysql if you have used them before, Other than that, the only way i can think of is through macro recorders but that won't do the job perfectly. So my advice is get an api from blocktrail or any other bitcoin processor and let a script run in the background.
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.