質問

set mytexts to make new text frame with properties {contents:"Annonation " & g & ":" & param_Text, kind:area text, position:{(-150), (new_Var)}, width:(checkValue3 - checkValue1), name:"notes"}

Above code is used to create text in Illustrator using Applescript. How to add stroke or border to the created text frame. Any references or advice is highly appreciated.

役に立ちましたか?

解決 2

Text Path.

set properties of text path of mytexts to {stroked:true, stroke width:0.1}

他のヒント

So it's a little hard to tell what you're asking for.

Are you trying to add a stroke to the outside of your text frame, like you might do in the appearance panel? Something like this?

enter image description here

If so, then you're out of luck. There's no access to extra strokes and fills from within scripting (source).

But maybe you just want to apply a stroke to the text, to give it an outline. Something like this.

enter image description here

In that case, this is the AppleScript you want to use

tell application "Adobe Illustrator"
            -- customize this as needed for your app
    set theFrame to (make new text frame in current document with properties ¬
        {contents:"My text", kind:area text, name:¬
            "notes"})
    set theRange to text range of theFrame
    set stroke color of theRange to {red:45, green:20, blue:128}
end tell
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top