Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

read return values in CC Extension Panel

$
0
0

I am trying to read some information back to a javascript file in a CC extension panel. I am trying this which according to all the samples and documentation should work.

 

>> js/host/main.js

var getEnvironment = function(){

    var res = "1234";

    writeLn('returning '+res);

    return res;

};

 

>> js/main.js

function onLoaded() {

    var csi = new CSInterface();

    csi.evalScript("getEnvironment()", function(result) {

        console.log(result);

    });

};

 

When I load the extension, I can see the line "returning 1234" displayed  in the info panel. However the console.log(result) will not print out the value. What am I doing wrong? This is as simple as it gets and I just cant get it to work!

 

Please help.


Viewing all articles
Browse latest Browse all 2143

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>