i'm looking into doing a semi-complicated ui. i've done some basic ui stuff before, but i've seen information on the internet that is conflicting between the 'correct' way to do script ui. i've seen: var w = new Window("dialog"); w.add("statictext", undefined, "label text"); and i've also seen var dlg = new Dialog();
which is the right way? am i right in thinking that new Dialog() is the correct way?
I'm confused because I need to add a few push buttons, and though i could do w.add("button", undefined, "label"); with the first format, I can't find an alternative for the latter method. ie: var col = dlg.dialogColumns.add(); col.staticTexts.add()...
uhm, for some reason, the page decided to post my question before I told it to. anyway, i can't find something like col.buttons.add () for the latter method!
There's two separate types of user interfaces.
There's the Dialog InDesign object. This offers very limted user interface capabilities, but it's very easy to use and has some nice widgets.
Totally separate from that is Script UI. Script UI is available in Photoshop (since CS2) InDesign, and Illustrator since CS3.
If you need interactivity in your Uis you'll need Script UI. You can customize the look of the Script UI dialogs as well...