Sorry about that, this might be closer.
Select the name and press clear.
var dlg =
"dialog{text:'Script Interface',bounds:[100,100,350,350],"+
"panel0:Panel{bounds:[10,10,240,240] , text:'' ,properties:{borderStyle:'etched',su1PanelCoordinates:true},"+
"docs:ListBox{bounds:[10,40,220,190] , properties:{multiselect:false}},"+
"statictext0:StaticText{bounds:[50,10,160,27] , text:'Opened Documents' ,properties:{scrolling:undefined,multiline:undefined}},"+
"clear:Button{bounds:[10,200,100,220] , text:'Clear' }"+
"close:Button{bounds:[130,200,220,220] , text:'Close' }}}";
var win = new Window(dlg,"Open Docs");
selection=0;
win.center();
for(var a = 0;a<documents.length;a++){
win.panel0.docs.add("item",documents.name);
}
win.panel0.docs.selection=0;
win.panel0.docs.onChange = function() {
selection = parseInt(this.selection);
}
win.panel0.clear.onClick = function() {
win.panel0.docs.remove(selection);
}
win.panel0.close.onClick = function() {
this.parent.parent.close(1);
}
win.show();
... View more