selectAllGradients();
function selectAllGradients(){
if ( app.documents.length > 0 ) {
var doc = app.activeDocument;
doc.selection = []
for ( i = 0; i < doc.pathItems.length; i++ ) {
if (doc.pathItems[i].fillColor.typename == "GradientColor") {
doc.pageItems[i].selected = true;
};
};
};
};