illustrator stroking line

Hi Folks-

I’m having a tough time figuring out the syntax for illustrator. I have some books coming in the mail but was wondering you could help me get this line to stroke correctly. The second line, set to a spot color, works, but the first one generates errors.


tell application "Adobe Illustrator"
	make new document with properties {color space:CMYK}
	set spot646 to make new spot in document 1 with properties {name:"PANTONE 646 C", color:{cyan:65.0, magenta:30.0, yellow:0.0, black:11}, color type:spot color}
	set grey30 to make new spot in document 1 with properties {name:"30 % Black", color:{cyan:0.0, magenta:0.0, yellow:0.0, black:30}}
	tell document 1
		make path item at layer "Layer 1" with properties {entire path:{{100, 118}, {250.03, 118}}, stroke width:0.5, name:"line1", stroke color:{class:CMYK color info,
 tint:100.0, spot:spot "grey30"}}
		make path item at layer "Layer 1" with properties {entire path:{{100, 100}, {116.67, 115}, {133.34, 130}, {150.1, 145}, {166.68, 160}, {183.35, 175},
 {200.02, 190}, {216.69, 205}, {233.36, 220}, {250.03, 235}}, stroke width:2.0, name:"Path2", stroke color:{class:spot color info, tint:100.0,
 spot:spot "Pantone 646 C"}}
	end tell
end tell

the 646 is supposed to be a spot color, the second one is just my latest attempt to get a line to print 30% K.

thanks…

Ralph

Ralph, at a glance it looks to me like your just missing defining the color class before the values.

tell application "Adobe Illustrator"
	make new spot in document 1 with properties ¬
		{name:"PANTONE Red 032 C", color:{class:CMYK color info, cyan:0.0, magenta:90.0, yellow:86.0, black:0.0}, color type:spot color}
end tell

The thing Ive not been 100% on this is the swatches get a % by the name when one’s made in the GUI don’t and tint sliders appear white but do work? no idea why?

Hi Ralph

This should get you a 30% tint of black!

tell application "Adobe Illustrator"
	make new document with properties {color space:CMYK}
	set spot646 to make new spot in document 1 with properties {name:"PANTONE 646 C", color:{cyan:65.0, magenta:30.0, yellow:0.0, black:11}, color type:spot color}
	set grey30 to make new spot in document 1 with properties {name:"30 % Black", color:{cyan:0.0, magenta:0.0, yellow:0.0, black:30}}
	tell document 1
		make path item at layer "Layer 1" with properties {entire path:{{100, 118}, {250.03, 118}}, stroke width:10.0, name:"line1", stroke color:{class:CMYK color info, cyan:0, magenta:0, yellow:0, black:30}}
		make path item at layer "Layer 1" with properties {entire path:{{100, 100}, {116.67, 115}, {133.34, 130}, {150.1, 145}, {166.68, 160}, {183.35, 175}, {200.02, 190}, {216.69, 205}, {233.36, 220}, {250.03, 235}}, stroke width:2.0, name:"Path2", stroke color:{class:spot color info, tint:100.0, spot:spot "Pantone 646 C"}}
	end tell
end tell

thickened your line up so you can see it!!

That worked great, guys. Watch for another exciting question on “doub” data types… coming soooooon.

-Ralph :confused: