Eveything's working fine now: the one remaining fly (and its only a tiny one) in the ointment is illustrated by the following script:
In the above, the second loop won't run after being copied and pasted directly into the script window, because the script window doesn't appear to recognise HTML carriage returns. I've discovered that I can bypass
that problem by copying the script into MS Word* first, and then
recopying the copy into the script window - but that's a bit of a nuisance, so the one remaining question is... is there an easier way than that to make the script window see the program exactly as it appears above?
[* Not WordPad, which loses the tab stops, whereas Word doesn't.]