11 Replies Latest reply on Sep 21, 2015 11:16 AM by aiScripting

    UI (Window, dialog, palette etc) reference info for AI scripting

    alanomaly Level 1

      I'm looking for standard reference info on UI elements like popup windows (dialogs, palettes etc). I've been through the Illustrator CS6 Javascript Scripting reference guide and also the CS6 Scripting guide, checking every mention of the words "Window", "Dialog", "Palette" etc (there aren't many), plus related terms like "edittext" and "slider" (which seemingly don't exist in these documents at all), and can't find what I'm looking for.

       

      ----------

       

      I'm trying to script a simple info box that contains information generated by a script that doesn't need to be closed before the user continues working.

       

      All I'm trying to find out is the basics. From looking at other scripts I've figured out that you can create a popup box like this:

       

      var box = new Window('dialog', 'Some title');
      
      var panel = box.add(panel, undefined, 'Panel title');
      panel.add('edittext', undefined, 'Default value');
      panel.add('slider', undefined, /*Default numeric value*/,/*min*/,/*max*/);
      
      var group = box.add(group, undefined, 'Group title');
      group = area_len_box.add('group', undefined, 'Title (not displayed)');
      group.orientation='row';
      group.closeBtn = group.add('button',undefined, 'Close', {name:'close'});
      group.closeBtn.onClick = function(){
        box.hide();
        return false;
      }
      

      ...which is enough for a very rudimentary input system, but one which has to be closed before the user can return to their work - and I can't find any resource that gives the full options:

       

      • What are the other options for 'new Window'? I'm aware of 'palette' which appears to need an array of four co-ordinates like [20,20,100,100], but it clearly needs something else too as every palette I've made instantly closes. And what else is there beyond Window and Palette?
      • What other input devices are there beyond edittext and slider, and what parameters do they each need?
      • What can go in the "undefined"s I see everywhere these are used?
      • etc etc

       

      There must be a reference to this somewhere, but I can't find it.