In a Configurator 4 created panel for Photoshop and I have a button for the menu item Curves.
Here is the script that I got from script editor in Configurator. When I run this script from ExtendScript, it works perfectly.
ErrStrs = {}; ErrStrs.USER_CANCELLED=localize("$$$/ScriptingSupport/Error/UserCancelled=User cancelled the operation");
try {var idCrvs = charIDToTypeID( 'Crvs' ); executeAction( idCrvs, undefined, DialogModes.ALL );
} catch(e){if (e.toString().indexOf(ErrStrs.USER_CANCELLED)!=-1) {;
} else{alert(localize("$$$/ScriptingSupport/Error/CommandNotAvailable=The command is currently not available"));}}
How would I transfer (translate) the above script to the main.js file in the "Hello Word" sample extension?
Main.js
(function () {
'use strict';
var csInterface = new CSInterface();
// Reloads extension panel
function reloadPanel() {
location.reload();
}
function init() {
themeManager.init();
$("#btn_reload").click(reloadPanel);
$("#btn_test").click(function () {
csInterface.evalScript('sayHello()');
});
$("#btn_curves").click(function () {
});
}
init();
}());
Thanks so much for your help. Sam