Hi Uwe,
Becasue it only a part of my Script, the whole script I use to press a shortcut and run the script which can record the active Page Name in the floating palette, the floating palette can also type the page no, but when print will check if there is any duplicate name for print, for inDesign if I type 1- in page Range, that mean from page 1 to end, so if in the palette I type 1-, 3, and if my activeDocument have 5 pages, that mean will print 1,2,3,4,5,3 so i want the result is 1,2,3,4,5, it ok when the page style is 1,2,3,4 ...
but when the page style change to 01, 02, 03, 04.... it will not delete the duplicate name
myEditPg and myFirstPage not use, I forgot to delete
Thanks
Joan