Okay, this is super basic, yet somehow I'm blanking on how to do this. I'm just trying to read and write the name property of an artboard. Simple, right? So, if I return the properties of the artboard, there it is: name:{"artboard 1"}. I can't seem to get the syntax for how to get the contents of the name. I can get the dimensions of the rectangle readily. Trying the same technique to the name property throws an error (see the three commented-out lines of code at the end). I've tried assigning the name directly (set ABname to name of testArtboard), errors too.
So, how is it done? (CS6)
Thanks, Alex
tell application "Adobe Illustrator"
set myDoc to current document
set myArtboards to artboards of myDoc
set testArtboard to item 1 of myArtboards
return properties of testArtboard
## returns {artboard rectangle:{-0.31640625, 163.0, 611.68359375, -1021.0}, ruler PAR:1.0, show center:false, show cross hairs:false, show safe areas:false, ruler origin:{0.0, 0.0}, name:"Electronic", container:document 1 of application "Adobe Illustrator", best type:reference, default type:reference, class:artboard, index:1}
set ABrectangle to artboard rectangle of testArtboard
set x1 to item 2 of ABrectangle
# return x1
#set ABname to name of testArtboard
#set ABnameproperty to name of testArtboard
#set ABname to item 1 of ABnameproperty
#return ABname
end tell