Thank you @loicaigon for your encouragement! The script is c. 2000 lines long (without the GUI), and it took me c. 50 hours to finalise it (ouch, that's just 40 lines per hour, which is far from exceptional!). But it is not the most important, given the time saved!