Quantcast
Channel: Adobe Community : Popular Discussions - Premiere Pro SDK
Viewing all articles
Browse latest Browse all 53010

Passing information from jsx to js.

$
0
0

Hello Community,

I have a problem with passing information from jsx to js file.

 

my jsx file:

$.extendScript = {  test : function() {    return "string";  },
}

 

my js file.

(function () {    var cs = new CSInterface();    var variable = "";    cs.evalScript('$.extendScript.test()', function(result) {       variable = result;       alert("variable in evalScript =" + variable);     });    alert("variable in outside = " + variable);    
}());

 

In evalScript function the variable get's the string from jsx function but when I want to use it outside I get empty string again.

Also I get the alert outside evalScript first in order. Why this happens?

 

 

Does anyone know why this happens and how to fix this?

Best Regards


Viewing all articles
Browse latest Browse all 53010

Trending Articles



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