Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Complex Expression For loading data from external file

  • Complex Expression For loading data from external file

    Posted by Sergio Pol on July 8, 2013 at 4:37 pm

    Hello I’m working on this project which I’d like to enhance with expressions. It’s a low bar comp in which I have name and last name with different colors. What I want is for AE to load the data to edit the low bar from a.txt file. I assume I won’t be able to achieve this with a single text layer but with two. One for each item. So the problem is telling the “Lastname” layer to position horizontally according to the “name” layer since its width will always vary. I found a looong expression that calculates the size of a text box but it’s too slow and the whole intention here is to edit it quickly. I’d also like to have the expression rename the comp to the name contained in the txt file if possible. Thank you!!

    Sergio Pol replied 13 years, 1 month ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    July 8, 2013 at 5:12 pm

    That job would be much more suitable for a small script. A script can easily determine text extents (difficult with expressions), rename comps (impossible with expressions), read text files (possible, but ugly with expressions), etc. The downside is that it’s not a live link, so you can’t just change the text file and have things in your project automatically update (you have to run the script).

    Shouldn’t take more than an hour or two to write and test if you’ve done it before, somewhat longer if it’s your first scripting project.

    Dan

  • Sergio Pol

    July 8, 2013 at 5:18 pm

    Well it would be my first scripting project so if you could guide me to where to start from I’d appreciate it very much. I’ll google for a tutorial on writing a script in the meantime. Thank you Dan.

  • Dan Ebberts

    July 8, 2013 at 5:30 pm

    David Torno has posted a series of scripting tutorials. You can find links to them on Adobe’s AE scripting forum.

    Dan

  • Sergio Pol

    July 8, 2013 at 6:53 pm

    Thanks

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