This site aims to be the ultimate resource for Adobe Illustrator(c) scripting. Here you will find regularly updated collection of free scripts for all your creative needs.

If you find yourself doing the same task again and again, or you have an idea how to optimise your  workflow – get in touch, and we will provide solution.

Randomly select objects

Randomly select a percentage or specific number of objects from within the
current selection. Based on the Randomill Selection Function.

This script can be used to randomly select a percentage or specific number
of objects from within the current selection. The selection algorithm is
optimised so that it will select or deselect based on how many operations
have to be completed. Regardless, it may take some time to run the script on
large sets of objects.

How to use:

Select which mode you’d like to use. The ‘Percentage’ mode will select that
percentage of objects from within the current selection in the document. The
‘Count’ mode will select the exact number of objects entered in the ‘Value’
field.
There is error handling for selecting too many or too few objects, as well
as for entering non-valid values for the ‘Value’ field. 
This selection script is a basic version of Randomill’s
(https://randomill.com/) selection function.