ok, it works, somehow... but it still has bugs, it works very slowly on real files, like a magazine - just because InDesign create and store new gradient color everytime you make any change to the gradient, especially if it's not saved in swatches... and I still need to add "go to selection" somehow, because I don't see what it has found and selected, but it still better than nothing upd: auto zooming to selection added #target:indesign; #targetengine:GradientTextToOutlines; var w = new Window ("palette", "Convert gradient text to outlines"); w.alignChildren = ['center', 'top']; w.orientation = "row"; var prev = w.add ("button", [0,0,36,26], "<<", {name: "Prev"}); // Previous var outline = w.add ("button", [0,0,60,26], "Outline", {name: "Outline"}); var next = w.add ("button", [0,0,36,26], ">>", {name: "Next"}); // Next w.show (); var gradients = app.activeDocument.gradients; var i = 0; var selection; var mySearch; var element = 0; var flag; function zoom(){ app.activeWindow.zoomPercentage = 75; app.activeWindow.zoom(ZoomOptions.fitSpread); } next.onClick = function(){ app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing; app.findGrepPreferences.fillColor = gradients; mySearch = app.activeDocument.findGrep(); while(mySearch<1 && i < gradients.length){ i++; app.findGrepPreferences.fillColor = gradients; mySearch = app.activeDocument.findGrep(); }; if(flag == "prev"){ element = element+2; if(element > --mySearch.length) element = 0; selection = app.select(mySearch[element++]); zoom(); flag = "next"; } else if(element < mySearch.length && element >= 0){ selection = app.select(mySearch[element++]); if(element > --mySearch.length) element = 0; zoom(); }else{ element = 0; selection = app.select(mySearch[element++]); zoom(); } } outline.onClick = function(){ if(!flag){ app.select(mySearch[element++].createOutlines()); zoom(); } else if(flag == "next"){ app.select(mySearch[--element].createOutlines()); zoom(); } else if(flag == "prev"){ app.select(mySearch[++element].createOutlines()); zoom(); } if(mySearch.length<2){ i++; } } prev.onClick = function(){ app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing; app.findGrepPreferences.fillColor = gradients; mySearch = app.activeDocument.findGrep(); while(mySearch<1 && i < gradients.length){ i--; app.findGrepPreferences.fillColor = gradients; mySearch = app.activeDocument.findGrep(); }; if(flag == "next"){ element = element-2; if(element < 0) element = --mySearch.length; selection = app.select(mySearch[element--]); zoom(); flag = "prev"; } else if(element >= 0 && mySearch.length > element){ selection = app.select(mySearch[element--]); zoom(); if(element < 0) element = --mySearch.length; }else{ element = --mySearch.length; selection = app.select(mySearch[element]); zoom(); } } by the way, dropbox confirmed that they were able to reproduce the problem and have filled a ticket for the team
... View more