FORUMS: list search recent posts

csv scripts

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
peter menich
csv scripts
on May 6, 2012 at 12:08:58 am

Hey all,

I'm heavy duty into csv importing scripts, way over my head.

I'm trying to mod a script by the inimitable Dan Ebberts...

http://www.motionscript.com/ae-scripting/create-text-layers-from-file.html

I'm trying to modify this so that I can change things like...

01_Instead of importing the file and creating a text objects, it creates a null or a light, or a solid.

02_Instead of naming the new object with all the text from the string, be able to split the string and just use the first 'value' or "item' in the string that delimitated by a ',' in the line.

03_Take the values form other items and apply them to other properties within the object created.


The main issue I'm having if finding a way to identify the correct syntax for the properties.

For instance; if I change..

while (!myFile.eof){
name = myFile.readln();
if (text == "") text = "\r" ;
myComp.layers.addText(name);
}

to

while (!myFile.eof){
name = myFile.readln();
if (text == "") text = "\r" ;
myComp.layers.addLight(name);
}


to add a light instead of a text object, I get...

Unable to execute script at line 50. After Effects error: Unable to call “addLight” because the call requires 2 parameters.

How do I find out the correct syntax and its associated properties?

There doesn't seem to be a way of selecting a property and finding the internal naming structure.

I hope someone knows the answer out there!

P



Return to posts index

Dan Ebberts
Re: csv scripts
on May 6, 2012 at 12:28:51 am

Just Google "After Effects Scripting Guide". The top entry will take you to the pdf for CS3. For changes since CS3, you'll need to check out Todd Kopriva's blog. Here's the link to the CS4 changes:

http://blogs.adobe.com/toddkopriva/2008/12/after-effects-cs4-scripting-ch.h...

You'll also want to look at Adobe's JavaScript Tools guide, which covers file I/O, UI, and a bunch of other stuff. You can get to it from the Help menu of the ExtendScript Toolkit (from AE: File > Scripts > Open Script Editor; then Help > JavaScript Tools Guide).

Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]