launch vbs file in an AE script

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
lougris
Posts: 12
Joined: March 12th, 2012, 5:29 am

May 7th, 2012, 12:18 pm

Hello,

How could you launch a vb script in AE, i've tried to do this :
var vbsFile = new File(pathVbsFile);
vbsFile.execute();

But it doesn't work...

Thanks in advance

Fred
zold
Posts: 14
Joined: March 25th, 2011, 9:15 am
Contact:

May 9th, 2012, 6:51 pm

Check page 169 of CS3 (+) scripting guide:
System callSystem() method
system.callSystem (cmdLineToExecute); Description
Executes a system command, as if you had typed it on the operating system’s command line. Returns whatever the system outputs in response to the command, if anything.
In Windows, you can invoke commands using the / c switch for the c m d . e x e command, passing the command to run in escaped quotes (\ " . . . \ " ). For example, the following retrieves the current time and displays it to the user:

Code: Select all

var timeStr = system.callSystem("cmd.exe /c \"time /t\""); alert("Current time is " + timeStr);
cmdLineToExecute
A string containing the command and its parameters
etc.
Post Reply