AI CS3 - Automate spot color gradations in swatch palette

Here’s a script that takes all the spot colors in your Swatches palette and generates a user-specified number of gradations - ie, tints from 10% to 90%, or whatever increment you choose.



tell application "Adobe Illustrator"
	set the_number to text returned of (display dialog "How many gradations per spot color?" default answer "10") as integer
	set the_step to (100 / the_number)
	set myDoc to document 1
	tell myDoc
		set the spot_list to (index of (every swatch of it whose class of color = spot color info and name ≠ "[Registration]"))
		repeat with tint_me in the spot_list
			repeat with i from 1 to (the_number - 1)
				make new swatch with properties {color:{tint:(i * the_step), spot:spot of color of swatch tint_me}}
			end repeat
		end repeat
	end tell
end tell