Thank you xelawho.
It turned out to be 'onfinish' which worked.
I have learnt to read the screed for the plugins, but I must confess, I would not have been likely to find that solution - even having read up on it.
The difference between genius and stupidity is that genius has its limits. (Albert Einstein)