Hi. Please can someone help me with the following if they have any experience scripting for Adobe Illustrator?
I’m trying to create a simple list of page items in AppleScript, but I keep getting this error:
Can’t make «class caPA» 1 of «class caLY» 1 of document 1 of application "Adobe Illustrator" into type vector.
Here is the simplified script:
tell application "Adobe Illustrator"
tell document 1
set page_items to {}
set This_page_item to page item 1
set page_items to page_items & This_page_item
end tell
end tell
The error happens on this line:
set page_items to page_items & This_page_item
All I’m trying to do is create a list containing page items from the document, but it seems Illustrator object references can’t be appended to a normal AppleScript list in the way I expected.
Am I misunderstanding how Illustrator page item references work in AppleScript, or is there a different way I should be building the list?
Any help would be greatly appreciated. Thanks.