Copy link to clipboard
Copied
I've just written and tested my first dockable scriptUI with Visual Studio Code + ExtendScript Debugger. Everything was working well so I put the .jsx file in my AE 2019 ScriptUI Panels folder, restarted After Effects, and attempted in vain to launch it from within the app.
AE throws the error "unable to execute script at line 2. Execution halted", which launches the ExtendScript Toolkit debugger, revealing the error to be "show is undefined." Here's the snippet of code:
var myUI = createUI(this);
myUI.show();
// CREATE UI PANEL
function createUI(thisObj) {
var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "B-roll Autopilot", undefined, {resizeable:true, closeButton:true});
Strangely, there is no such error when I launch the script from the ExtendScript Toolkit, VSC or Atom.
Any idea what's going on? Tomas?
Can you upload full code? This snippet doesn't really help much.
In case you need a boilerplate for creating dockable panels, here's what I use in all my tools:
(function (thisObj) {
buildUI(thisObj);
function buildUI(thisObj) {
var win = (thisObj instanceof Panel) ? thisObj : new Window("palette", "script", undefined, {
resizeable: true
});
var button = win.add('button', undefined, 'Click me');
button.onClick = function(){
alert('Hello World');
};
win.onResizing = win.o...
Copy link to clipboard
Copied
Can you upload full code? This snippet doesn't really help much.
In case you need a boilerplate for creating dockable panels, here's what I use in all my tools:
(function (thisObj) {
buildUI(thisObj);
function buildUI(thisObj) {
var win = (thisObj instanceof Panel) ? thisObj : new Window("palette", "script", undefined, {
resizeable: true
});
var button = win.add('button', undefined, 'Click me');
button.onClick = function(){
alert('Hello World');
};
win.onResizing = win.onResize = function () {
this.layout.resize();
};
if (win instanceof Window) {
win.center();
win.show();
} else {
win.layout.layout(true);
win.layout.resize();
}
}
})(this);
Copy link to clipboard
Copied
Hey, Tomas! I updated my code with your boilerplate and it's working now.
THANK YOU.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more