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?
1 Correct answer
You're not escaping the quote characters, in the string you're passing.
Copy link to clipboard
Copied
You're not escaping the quote characters, in the string you're passing.

