I am trying to make a drop down that gets the print presets from InDesign CS. So far the drop down gets the list but they are all in one line and not on separate lines like a drop down list should be.
Here is the code…
tell application "InDesign CS"
set myDocument to active document
set myDialog to make dialog
set myPrintPresetList to (get name of every printer preset) as string
tell myDialog
set name to "Dialog Window"
set myDialogColumn to make dialog column
tell myDialogColumn
set myBorderPanel to make border panel
tell myBorderPanel
set myDialogColumn to make dialog column
tell myDialogColumn
make static text with properties {static label:"Message:"}
end tell
set myDialogColumn to make dialog column
tell myDialogColumn
set myTextEditField to make text editbox with properties ¬
{edit contents:"Hello Dude!", min width:180}
end tell
end tell
set myBorderPanel to make border panel
tell myBorderPanel
set myDialogColumn to make dialog column
tell myDialogColumn
make static text with properties {static label:"Printer Preset:"}
end tell
set myDialogColumn to make dialog column
tell myDialogColumn
set myPrintPresetsField to make dropdown with properties {string list:{myPrintPresetList}, selected index:1, min width:180}
end tell
end tell
end tell
end tell
set myResult to show myDialog
end tell