Hi Folks-
I’m trying to speed up an illustrator script by passing it an entire set of plotting coordinates at once, by putting them into a string:
set xList to "{100,100},{100,0},{100,100},{104.736842105263,100},{104.736842105263,0},{104.736842105263,100},{109.473684210526,100},{109.473684210526,0},{109.473684210526,100}" (etc..)
however, when I ask illustrator:
tell application "Adobe Illustrator"
tell document 1
make new path item at layer "Layer 1" with properties {entire path:xList, stroke width:3.5, name:"newPoint", filled:false, opacity:100.0, stroke cap:projecting, stroke color:{class:CMYK color info, cyan:0.0, magenta:0.0, yellow:0.0, black:100.0}, stroked:true} --
end tell
end tell
it adds in the quotation marks and yields:
make new path item at layer "Layer 1" of document 1 with properties {entire path:"{100,100},{100,0},{100,100},{104.736842105263,100},{104.736842105263,0},{104.736842105263,100},{109.473684210526,100},{109.473684210526,0},{109.473684210526,100},
…and the leading quotation mark appears to be giving me an error. Does anyone know how to strip out the initial and ending quotation marks? (illustrator CS2, btw)
thanks!
Ralph