Hi,
I am trying to create a script to specify a percentage of the selected items you want to remove.
Here is what I have so far.
I still need to work out on the alert prompt and the if statement, but for now, I have the feeling that the selection.length keep changing each time Illustrator delete an object, and I don't know how to make it stick.
var selection = app.activeDocument.selection; //alert prompt dialog for a percentage of deletion for (var i = 0; i < selection.length; i++) { if (Math.random < 0.5) { //need to work out the percentage alert("yes") selection[i].remove(); } }
Thanks for the help,