Article View: adobe.scripting.indesign
Article #1034Re: Drop down menu help
From: Kasyan_Servetsky
Date: Fri, 20 Feb 2009 18:02
Date: Fri, 20 Feb 2009 18:02
34 lines
1538 bytes
1538 bytes
myDialogResult();
if (myReturn) {
alert("You selected " + app.activeDocument.swatches[myDropdownResult].name);
}
else {
alert("You canceled dialog.");
}
function myDialogResult(){
with(myDialog = app.dialogs.add({name:"Swatches in the active document"})){
myDialogColumn = dialogColumns.add();
with(myDialogColumn){
with(borderPanels.add()){
staticTexts.add({staticLabel:"Swatches "});
myArray = app.activeDocument.swatches;
myDropdown = dropdowns.add();
myDropdown.stringList = myArray.everyItem().name;
myDropdown.selectedIndex = 0;
}
}
myReturn = myDialog.show();
if (myReturn == true){
myDropdownResult = myDropdown.selectedIndex;
myDialog.destroy;
return myDropdownResult;
}
else {
myDialog.destroy();
}
}
}
Technical Details
Message-ID:
<59b7ff12.0@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossingReferences:
<59b7ff12.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,524e3d77e3e624cf X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Kasyan_Servetsky@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: Drop down menu help Message-ID: <59b7ff12.0@webcrossing.la2eafNXanI> Date: Fri, 20 Feb 2009 10:02:50 -0800 References: <59b7ff12.-1@webcrossing.la2eafNXanI> Lines: 26 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit