Just not sure what I would/should change to either: (1) have my controls show up in the panel instead of the dialog window, or (2) have the dialog window appear without the panel showing up next to it as it currently does.
I'm including two screenshots; the first shows what gets drawn on when I run the script initially, and the second shows what remains after running or canceling the actions in the dialog window. I'm also pasting the first section of my code (the part that deals with generating the GUI).
Thank you for taking the time!

Code: Select all
var scriptWindow = new Window ('dialog', 'Beam Connection Builder'),
//Create window groups and elements
topLevelGroup = scriptWindow.add ('group'),
effectPanel = topLevelGroup.add('panel', undefined, 'Beam Connection Settings'),
useSelectedLayers = effectPanel.add('checkbox', undefined, 'Use selected layers'),
layerRangeOptions = effectPanel.add('group'),
useLayerRange = layerRangeOptions.add('checkbox', undefined, 'Use layers in range:'),
layerRangeMin = layerRangeOptions.add('dropdownlist'),
layerRangeDivider = layerRangeOptions.add('statictext', undefined, ' to '),
layerRangeMax = layerRangeOptions.add('dropdownlist'),
parentLayers = effectPanel.add('checkbox', undefined, 'Parent beams to source layers'),
distanceGroup = effectPanel.add('group'),
distanceSliderLabels = distanceGroup.add('group'),
minDistanceLabel = distanceSliderLabels.add('statictext', undefined, 'Min Distance:'),
maxDistanceLabel = distanceSliderLabels.add('statictext', undefined, 'Max Distance:'),
distanceSliderNums = distanceGroup.add('group'),
minDistanceNum = distanceSliderNums.add('edittext', undefined, 'Default'),
maxDistanceNum = distanceSliderNums.add('edittext', undefined, 'Default'),
distanceSliders = distanceGroup.add('group'),
minDistanceSlider = distanceSliders.add('slider', undefined, 0, 0, 2000),
maxDistanceSlider = distanceSliders.add('slider', undefined, 0, 0, 2000),
dialogButtons = topLevelGroup.add('group'),
createConnections = dialogButtons.add('button', undefined, 'Create Connections'),
cancelDialog = dialogButtons.add('button', undefined, 'Cancel');
activeComp = app.project.activeItem;
if (activeComp) { totalLayers = activeComp.layers.length; } else { totalLayers = 1; }
//align groups and elements, initialize default values
topLevelGroup.orientation = 'column';
layerRangeOptions.orientation = 'row';
effectPanel.orientation = 'column';
distanceGroup.orientation = 'row';
distanceSliderLabels.orientation = 'column';
distanceSliderNums.orientation = 'column';
distanceSliders.orientation = 'column';
effectPanel.alignChildren = 'left';
if (activeComp.selectedLayers.length > 0) {
useSelectedLayers.value = true;
useLayerRange.value = false;
} else {
useLayerRange.value = true;
useSelectedLayers.value = false;
}
parentLayers.value = true;
minDistanceNum.characters = 5;
maxDistanceNum.characters = 5;
evaluateDropDownLists();
Code: Select all
//draw the window
if (activeComp == undefined) {
alert('You must have an active Comp open to run this tool!');
} else {
scriptWindow.show();
}