Copy link to clipboard
Copied
Hi,
I'm trying to run a .exe File via ExtendScript. We're doing the same in AE which works fine using "system.callSystem(xyz.exe)" but "system" is unknown to Premiere.
Any ideas how to solve this?
Thanks,
Mathias
1 Correct answer
Exactly, node.js is not available in ExtendScript.
You can see it as some kind of framework/library that gives you server-features that standard browsers do not have. You can access the file-system or (in this case) execute shell commands. See the docs for all features: Node.js v4.1.0 Manual & Documentation
Node.js is running inside Premiere and you use it in your Javascript code. So you don't have to install it or set a server up, it's all there waiting for you to be used.
You can read more abou
...Copy link to clipboard
Copied
Node.js is your friend. You can execute commands using the node.js module 'child_process'. It works like this:
var process = require('child_process');
var exec = process.exec;
var cmd = "your windows prompt command";
exec(cmd, function(err, stdout, stderr) {
});
Since I´m a mac user, I have no idea which command executes an exe file from the command prompt but I'm sure you know it.
I hope this helps.
Thomas
Copy link to clipboard
Copied
Thomas, thanks a lot for your fast response!
I'm still trying to understand what node.js is about... it only works in HTML, right? Right now I'm using the ExtendScript Toolkit only.
Copy link to clipboard
Copied
Exactly, node.js is not available in ExtendScript.
You can see it as some kind of framework/library that gives you server-features that standard browsers do not have. You can access the file-system or (in this case) execute shell commands. See the docs for all features: Node.js v4.1.0 Manual & Documentation
Node.js is running inside Premiere and you use it in your Javascript code. So you don't have to install it or set a server up, it's all there waiting for you to be used.
You can read more about it here: CEP 6 HTML Extension Cookbook for CC 2015 · Adobe-CEP/CEP-Resources Wiki · GitHub
It is worth noting that you have to enable node.js in the CSXS/manifest.xml file of your panel. Like this:
<DispatchInfoList>
<Extension Id="com.frameio.panel">
<DispatchInfo >
<Resources>
<MainPath>./index.html</MainPath>
<CEFCommandLine>
<Parameter>--enable-nodejs</Parameter>
...
Thomas
Copy link to clipboard
Copied
Mathis, here's an old blog post about CEP panels, that shows how to fire a command line from within a panel; search it for 'mkdir'.
Copy link to clipboard
Copied
Thank you both!
It took some time to set up this HTML thing, but now its working!
Copy link to clipboard
Copied
Is there any way to call CEP script for extendscript to run external command?
From CEP panel i'm starting extendscript that creates sequense, and i need to run external ffmpeg command to make speedramp on some video files before inserting them to sequense (Time remapping is not available through extendscript)
Copy link to clipboard
Copied
Is there any possibility to make javascript wait until the cmd command is finished?
In my case the command is writing a txt file that will be processed later. At the moment javascript does not wait until it is complete which leads to some strange results...
Copy link to clipboard
Copied
I think the "use callback functions" suggestion on this StackOverFlow page will do what you want, without introducing a JQuery dependency (as the "use JQuery promises" suggestion would)...

