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

Introducing multiple functions in Extendscript

$
0
0

I have been doing my best to learn how to make more complicated scripts through the Premiere Panels, but keep getting hung up at this one issue.

 

I want to include checkboxes in the panel, that will allow an editor to "check" characteristics for their current project. They can then run the script from a button. Now I know this might not be the most compact or efficient way to code, but I am just copy/pasting a script with a few various changes for the project characteristics for the time being, and giving them different function names in the .jsx file (same set up that is shown in the Premiere.jsx file in the PProPanel sample). After adding some if statements to the HTML document javascript I call the function that I want to run, which works for a single function, but not when I add more than one. When multiple are involved I keep getting errors that "undefined is not a object" and that it is expecting a closing bracket. I have no clue where these are coming from.

 

In the HTML javascript I have this (just a section of it):

 

function myFunction() {

  if(document.getElementById("serialContent").checked == true){

  window.__adobe_cep__.evalScript("$._MYFUNCTIONS.mediaManage()", callback);

  }

  if(document.getElementById("serialContent").checked == false){

  window.__adobe_cep__.evalScript("$._MYFUNCTIONS.mediaManageAgain()", callback);

  }

  }

 

and over in the .jsx I have this for an example:

 

if (typeof($) == 'undefined') $ = {};

$._MYFUNCTIONS = {

  mediaManage: function() {

  alert("success # 1");

  }

  mediaManageAgain: function() {

  alert(success # 2);

  }

}

 

Any ideas out there, it seems so simple?


Viewing all articles
Browse latest Browse all 53010

Trending Articles



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