Page 1 of 1

Executing Script within another Script

Posted: June 4th, 2010, 4:40 am
by manohar
Hi there...
How to execute a script within another script..?? using "fileObj.execute()" command...

In my script I used the command like this...

Code: Select all

var myPath=new File("/C/Program Files/Adobe/Adobe After Effects CS3/Support Files/Scripts/GlobalVars.jsx");
myPath.execute();
It is working.., but it is not Executing the script... It is just opening the GlobalVars.jsx file in ExtendScript Toolkit. But I don't want that... I want to execute that script when I am executing my script..

any help please...
thanx in advance. :D

http://myaescripts.blogspot.com/

Re: Executing Script within another Script

Posted: June 5th, 2010, 1:11 am
by zold
Maybe something like this? (I'm not doing Windows right now):

Code: Select all

system.callSystem ('afterfx -r "/C/Program Files/Adobe/Adobe After Effects CS3/Support Files/Scripts/GlobalVars.jsx"');
Note where the single and double quotes are.
See scripting guide.
Also see viewtopic.php?f=8&t=366 for irregularities with quotes and .exe
Sorry; this is untested.

Re: Executing Script within another Script

Posted: June 5th, 2010, 3:41 am
by manohar
hey.. thanx for ur reply..
but that code given by you is not working for me...
any other help..!!

Re: Executing Script within another Script

Posted: June 5th, 2010, 6:20 am
by nab
Look at "call_nested_script.jsx" that ships with AE. Its is located in the "(Instructional)" folder, a subfolder of the Script folder.

Re: Executing Script within another Script

Posted: June 5th, 2010, 9:15 am
by manohar
heyyyy.... thanx nab..
I got it.. its working for me...
:D :D :D