I have a dropdownlist dialog, and I want to remember last selected, and next time when I run the script the selectedIndex will be the last selected index, for example, when I select number 3, it will type 3 in the insertionPoints, and next time I run the script again, I want the Selected:3
myDisplayDialog();
function myDisplayDialog(){
var myDialog = app.dialogs.add({name:"Symbol_v1.0"});
with(myDialog.dialogColumns.add()){
with(dialogRows.add()){
with(dialogColumns.add()){
staticTexts.add({staticLabel:"Selected: "});
var mySymbolArray = ["1","2","3","4","5"];
var myEachSymbol = mySymbolArray.toString().split(",");
with(dialogColumns.add()){
var myDropdownsTran = dropdowns.add({stringList:mySymbolArray, selectedIndex:0});
//myDropdownsTran = dropdowns.add({stringList:mySymbolArray, selectedIndex:0});
}
}
}
}
var myResult = myDialog.show();
if(myResult == true){
app.selection[0].texts[0].contents = myEachSymbol[myDropdownsTran.selectedIndex];
}
}