Hi Jump_Over,
Thank you very much for the reply. This looks promising, however I could not get it to work. I named the source text frame 'source' in the 'script label' panel and likewise the output as 'output'. but I recieved this error:
Ideally though, the script would be able to identify the 'source' and 'output' textframes by their relative positions, i.e. source will always be above output.
Is there a way I could select both frames and then execute the script?