FORUMS: list search recent posts

Calling a second script from within my main script.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Fabio Apelbaum
Calling a second script from within my main script.
on Jun 3, 2016 at 5:44:31 pm

Hi guys! another question!

I currently have two .jsx files, my main script and another that does an extensive task. My main script creates a UI which has a button that when clicked, it calls the 2nd script and runs it. I found out that I might need to use some of the information generated by my 2nd script to update events that happens in my main script. Is there a way to set/call variables or arrays of my 2nd script from my main script? I really like to void the option of merging the two into one file.

Currently im calling the 2nd script with the following code:

importINFO.onClick = function() {
var file = new File("/VOLpromo/04_SCRIPTS/GUI/GS_Import.jsxbin");
file.open("r");
eval(file.read());
file.close();
}


Thanks, any info will be appreciated!!

Happy friday everyone!

Fabio


Return to posts index

Miguel de Mendoza
Re: Calling a second script from within my main script.
on Jun 5, 2016 at 9:54:13 am

You can use #include statment at the top of the script:

#include Other_Script_Name.jsx


Make sure that the script is in the same folder, or in a subforlder:

#include Subfolder/Other_Script_Name.jsx


Return to posts index

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