Got an error using palette in Illustrator script
Hi All,
I got an error while running the palette dialog in Illustrator.
The below is my code.
var windowResource = "palette { \
orientation: 'column', \
alignChildren: ['fill', 'top'], \
preferredSize:[300, 130], \
text: 'Test', \
margins:15, \
\
sliderPanel: Panel { \
orientation: 'row', \
alignChildren: 'right', \
margins:15, \
text: ' Test ', \
}, \
\
customPanel: Panel { \
orientation: 'row', \
alignChildren: 'right', \
margins:15, \
applyButton: Button { text: 'OK', properties:{name:'ok'}, size: [50,24], alignment:['left', 'center'] }, \
} \
}";
var win = new Window(windowResource);
win.customPanel.applyButton.onClick = function() {
var cusTextCont = app.documents.length;
if(cusTextCont > 0) {
alert(app.documents[0].name);
}
else {
alert("no documents");
return;
}
};
win.center();
win.show();I just prompt the active document name in alert dialog.
I got the below error.

Anyone help me, how to resolve this.
Thanks.
