Skip to content

Instantly share code, notes, and snippets.

@lm913
Created January 14, 2016 14:20
Show Gist options
  • Save lm913/4ff76698eede93c598ea to your computer and use it in GitHub Desktop.
Save lm913/4ff76698eede93c598ea to your computer and use it in GitHub Desktop.
#target photoshop
#target estoolkit
app.bringToFront();
var win;
var winResource;
winResource = "dialog { \
orientation: 'column', \
alignChildren: ['fill', 'top'], \
preferredSize:[300, 130], \
text: '38178 - Placement', \
margins:15, \
\
sliderPanel: Panel { \
orientation: 'row', \
alignChildren: 'right', \
margins:15, \
text: ' Select Spec Doc ', \
dd:DropDownList{ properties: {items:['38178_001 - INV Man', \
'38178_002 - On Figure', \
'38178_003 - Jewelry', \
'38178_004 - Accessories']}, \
size:[300,20] }, \
} \
\
bottomGroup: Group{ \
cancelButton: Button { text: 'Cancel', properties:{name:'cancel'}, \
size: [120,24], alignment:['right', 'center'] }, \
applyButton: Button { text: 'Apply', properties:{name:'ok'}, \
size: [120,24], alignment:['right', 'center'] }, \
}\
}";
win = new Window(winResource);
win.bottomGroup.cancelButton.onClick = function() {
return win.close();
};
win.bottomGroup.applyButton.onClick = function() {
return win.close();
};
win.sliderPanel.dd.onChange = function() {
for (var id = 0; id < win.sliderPanel.dd.items.length; id++) {
if (this.items[id].selected) {
return(id);
}
}
};
win.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment