6 Replies Latest reply on Jan 8, 2017 8:29 PM by StrongBeaver

    Button stays active and no action taken ?

    StrongBeaver Level 2

      When clicking on the 'Group Invert' button; the button remains active and nothing happens when the follow script is applied to a group.

       var ui = new Window ("dialog");
       var uiConvert = ui.add("button",undefined,"Group Invert");
       var uiFind = ui.add("button",undefined,"Group Finder");
        ui.orientation = "row";
       ui.show();
       uiConvert.onClick = function() {
       var mDoc = app.documents[0];
        var nGroup = mDoc.groupItems[0].selected;
       if (nGroup >= 0) {
       app.executeMenuCommand("ungroup"); 
       }
      };