To read selection from Pages Panel is a problem using scripting.
However to interact with user is not, so SUI dialog which ask for page ranges (alike print dialog ask) could be a solution.
After removing saveAsCopy could be called, so original doc is ready for further choices.
Thanks Jarek for your quick response. Since I am not proficient in scripting (which I should of indicated initially), I am not familiar with what your answering. Can you (or someone else) please explain? Thanks again.
Can anyone come up with another way to quickly separate a multi-page InDesign template into individual pages? Thanks.
I want to resurrect this old thread, because I found a trick to gain the information what document pages are selected in the Pages panel.
Perfectly—I think—for InDesign CS6 (selected master pages or selected document pages):
4. Re: active page vs selected page
Uwe Laubender Jan 13, 2017
Not so for InDesign CC and above.
With newer versions I could only detect the selected document pages and the master spreads (not the individual master pages) that are selected in the Pages panel:
6. Re: active page vs selected page
Uwe Laubender Jan 15, 2017
Please test and give feedback in the thread where I published the code.