Hi, It seem like I just can’t get that text frame, I always get the error message "can’t get text frame BANANE of layer 1 of document 1. I tried different appoaches (page item, text frame, text path) to be able to address commands to that text frame.
Anybody has an idea?
tell application "Adobe Illustrator"
set MyDocument to current document
tell MyDocument
--make new layer with properties {name:"Dimensions"}
set DimensionColor to color of swatch "Artios_Dimensions and text"
set TrimSize to color of swatch "Artios_Cut"
set BleedColor to color of swatch "Artios_Outside bleed"
set ScoreColor to color of swatch "Artios_Crease"
tell layer "Layer 1"
set FrontPanelText to text frame "BANANE"
tell FrontPanelText to convert to paths
end tell
Yes, I tried with different text frames to make sure that wasn’t the problem. With wich version of Illustrator did you test it? I’m working with CC 2019 on Mac OS Sierra.
tell application "Adobe Illustrator"
set MyDocument to current document
tell MyDocument
--make new layer with properties {name:"Dimensions"}
set DimensionColor to color of swatch "Artios_Dimensions and text"
set TrimSize to color of swatch "Artios_Cut"
set BleedColor to color of swatch "Artios_Outside bleed"
set ScoreColor to color of swatch "Artios_Crease"
log (name of every layer)
tell layer "Layer 1"
(*
set FrontPanelText to text frame "BANANE"
tell FrontPanelText to convert to paths
*)
name of every text frame
end tell
end tell
end tell
Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) lundi 6 mai 2019 11:21:41
(name of every layer of document 1)
get name of every text frame of layer “Layer 1” of document 1
→ {“”, “”, “”, “”, “”, “”, “”, “”}
end tell
Result:
{“”, “”, “”, “”, “”, “”, “”, “”}
That result isn’t returning commas; those are all empty text items—meaning there are no assigned names, as I indicated may be the possibility. A name has to be assigned to an object. Since you asked, I tested in CS3, but there are rarely changes in basic functionality.