Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Issue passing string from .js to .jsx file in a function argument

New Here ,
Jun 20, 2021 Jun 20, 2021

Copy link to clipboard

Copied

I am attempting to pass a single variable from javascript to extendscript in a Premiere extension, but having issues.


If I attempt:

// .js file
csInterface.evalScript('$._PPP_.AssignPaths("QuotedString")');

 

// .jsx file
$._PPP_ = {
AssignPaths: function (a) {
alert("String Received " + a);
},
};

 

....Then the information is passed to the jsx file and displayed in an alert dialog. But if I attempt


//.js file
var StringVar = "My Passed Variable";
csInterface.evalScript('$._PPP_.AssignPaths(StringVar)');

 

....using the same .jsx file, the .jsx file fails to respond.


Is this because the first example is passing a constant and the second example is an actual string? What else would prevent the string from being passed to the extendscript function in this case?

 

TOPICS
SDK

Views

133

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Jun 21, 2021 Jun 21, 2021
You're not escaping the quote characters, in the string you're passing.  See "transcodeexternal", in PProPanel's index.html.

Likes

Translate

Translate
Adobe Employee ,
Jun 21, 2021 Jun 21, 2021

Copy link to clipboard

Copied

LATEST

You're not escaping the quote characters, in the string you're passing. 

See "transcodeexternal", in PProPanel's index.html.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines