-
An include statement?
I’m relatively new to JavaScript and After Effects CS4 and need some help.
Being a long-time C developer I’m accustomed to using the #include to include header files. There is mention of a similar preprocessor feature in the JavaScript Tools Guide but my attempts to use in the ExtendScript Toolkit have failed. I’m seeing a complaint around the ‘#’ character.
Let me back up a bit. What I’m trying to accomplish is a mechanism to support reuse of code without having to build a library outside of JavaScript. An example of this is use of a function to read a comma separated values file (CSV) and return an array of values. This is something I could use over and over again but don’t want to copy and paste the code to each of my scripts. My experience has taught me the maintenence problem becomes larger with each copy.
So, what I really need is a way to build a library of JavaScript functions I can chose from and include as needed in a script I’m working on.
Any suggestions? Have I overlooked something?
Thanks
Nothing’s impossible — it’s just some things are more difficult than others.