Skip to main content
Participant
December 4, 2013
Question

Is there a way to access per-character text properties via script?

  • December 4, 2013
  • 2 replies
  • 952 views

The TextDocument object (available via the source text property of a text layer) seems to only provide information about the first character of the text. How can I access properties for other characters?

Also, how can I access the following:

  • The paragraph indentation options (indent left, right, first line, etc)?
  • The vertical scaling, horizontal scaling, kerning, leading, tsume, baseline shift, and character styles (faux italic/bold, subscript,superscript, small caps, all caps)?

Are these available to scripts at all?

Thanks,

Yair Halevi (Spock)

This topic has been closed for replies.

2 replies

Inspiring
December 4, 2013

This comes up quite often. You're correct, you can only access information about the first character, and when you apply settings they're applied to all characters.

Check out the TextDocument section in the AE scripting guide to see what you can access. For justification you can do stuff like (see guide for full list):

if (textDoc.justification == ParagraphJustification.LEFT_JUSTIFY) {

     textDoc.justification = ParagraphJustification.RIGHT_JUSTIFY;

}

You can't access any of the other properties you mentioned. I'd recommend filing a feature request for access to other properties and per character settings:

https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

Legend
December 4, 2013

Hi Yair,

I've worked with the TextDocument object and much of what you are asking is completely not available to developers via the ExtendScript API.  It's a pity, yes.  You can get the paragraph justification, though.

--Arie