Just to make everyone aware
Set shapesColl = pcbDoc.FabricationLayerGfxs(epcbFabGeneratedSilkscreen,epcbSelectAll, epcbSideTopOrBottom, True)
will result in an empty collection, unless you have had Generated Silkscreen turned on once in Display Control
The attached script example will turn on/off Generated Silkscreen for both Top and Bottom, then set settings back to how they were before sunning the script.
For more examples on settings in Display Control, use this link - it will show a number of results in this community.