can somebody tell me how I write the equivalent of the below applescript in ExtendScript please.
tell application "Adobe InDesign CS6"
tell active document to delete (every page whose name does not start with "TRR")
I think the following should do it (untested):
var pp = app.activeDocument.pages.everyItem().getElements(), p;
while (p = pp.pop()) if (p.name.substr(0,3) !== "TRR") p.remove();
That's exactly what I needed.
Thanks very much,