Thankyou jacques... I now understand better that using
put URL someWebSite gives me some 'html' from the website as just plain old text. Thus when I
set the htmlText of a field or part of a field (which the Dictionary says it must be, i.e. not just a variable) to that text it gets made into something like it might appear as if viewing a web site.
I'm not really clear yet on whether/how that retains all the hyperlinks of the original 'cos I don't fully understand the Dictionary entry
<a> </a> Encloses text whose textStyle is "link" or whose linkText property is not empty. If the textStyle of the text contains "link", the linkText is included as the value of the "href" attribute. Otherwise, it is included as the value of the "name" attribute.
<img src="imageSpecifier"> Replaces a character whose imageSource property is not empty. The value of the imageSource property is included as the value of the "src" attribute.
In any case that does not concern me here as I only want the plain text extracted and these two things seem to be ignored.
***********************
The big difference though is that actually doing the
set the htmlText into a 'real' field takes quite a few seconds (up to 10) whereas putting it into
the templateField which is not displayed is close to instantaneous. And the
put the text of the templateField into fld "output_fld" is similarly fast.
***********************
So all I have to do is to remove anything between '<script> and '</script>' which seems otherwise to be included as text, and a few other minor and simple things, e.g.replace " " with 'empty', to get the formatting the way I want it.