since you asked in the scripting forum:
Depending on your version of InDesign you can build your own script doing this.
Recently I showed, that it is possible to detect selected pages in the Pages panel by scripting.
For CS6 there is a flawless solution even to detect selected pages of the masters section.
For all other versions of InDesign that support property pageColor it is possible to detect all selected document pages.
Details for the dection mechanism can be found here in the forum.
You can build on that implementing a pre-defined range of selected pages for the PDF export dialog.