We have some clients that require a page count on each page of the output in the form 'Page X of Y'. I understand that this cannot be acheived within a Planet Press form as PP can only work forward through the data steam, so posts on the forums suggest using scripts in PP Watch instead.

I'm not familiar with any of the scripting languages that PP Watch supports (VBScript, Perl, Python, JavaScript and TCL?) though obviously I'm willing to learn. I've found some examples for Perl and VBScript scripts that open, read, edit etc and close the text file, does anyone have examples for the other languages?

As part of calculating the number of pages within a document I need to measure the width of a piece of text to see if it will overflow a line (the equivalent of the PPTalk function StringWidth). I've found MeasureString in JavaScript, does anyone know of any equivalents in the other languages?

We're currently using PP version 5.

Thanks,
Steve