Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Align Text Left Scripting

  • Align Text Left Scripting

    Posted by Matthew Joal on March 18, 2011 at 12:38 am

    I’m new to scripting with After Effects and I’m having troubles doing the simplest thing. I got most of my program to work just fine, however, when I used the built-in text replace function it changes my text from left aligned to center aligned. I need to set my text layer to left align again after the text it changed.

    Can anyone please help me? I know this is very basic, I just can’t find anything in the scripting guide that will help.

    My last resort option is to set the anchor point of the text field but I would rather just set the alignment.

    Here is the replace function:

    replaceTextInLayer(app.project.item(99).layer(8), “Original”, “New”)

    I just want to left align this text layer.

    app.project.item(99).layer(8)

    Thanks in advance for your help!

    Brian Berneker replied 15 years ago 2 Members · 1 Reply
  • 1 Reply
  • Brian Berneker

    June 9, 2011 at 1:55 am

    I have the same problem (right align actually):

    I create a text object, set it right aligned and all is well.
    I then duplicate the object so that it has the same font, alignment etc., and use an expression to get the source text from the first text object. Once I do this, the new layer suddenly changes its alignment to “centered” and is uneditable!

    Solution/Workaround PLOX?

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy