3 Replies Latest reply: May 16, 2012 9:30 AM by //-- Michel -- RSS

    any good websites for scripting buttons and windows?

    samwilliams21

      i want to start adding windows and buttons to my program, does anyone know any good sites i can look at?

       

       

      thanks,

       

      Sam x

        • 1. Re: any good websites for scripting buttons and windows?
          David Torno Community Member

          Are you referring to controls within dockable/floating script windows? I made a post awhile ago with some base code for some of the more common controls.

           

          http://forums.adobe.com/thread/913953?tstart=90

          • 2. Re: any good websites for scripting buttons and windows?
            samwilliams21 Community Member

            thanks so much David. i wanted you ask you something about browse windows if you know...

             

            the code at the bottom of the screen creates three buttons - the third is a browse button, so the user can search for a particular file. Do you know how to have a drop down browse box in pop up window?. Theres so little documentation on this sort of thing. i was hoping you would know something about it....

             

            i know that this line will create a browse pop up:  var targetFolder = Folder.selectDialog("Import items from folder...");

             

            but i want to be able to have it as part of the window.

             

            If you know anything that would be a great help, thanks, Sam

             

            {

            function myScript(thisObj) {

                      function myScript_buildUI(thisObj) {

                                var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "STREAMLINE OLIVE!", [0, 0, 300, 300]);

             

                                res="group{orientation:'column', alignment:['fill', 'fill'], alignChildren:['fill', 'top'],\

                                       findStr: StaticText { text:'please enter the exact names of the following render Layers:', alignment:['left','center'] }, \

                                       findRow: Group { \

                  alignment:['fill','top'], \

                  findStr: StaticText { text:'Olive colour:', alignment:['left','center'] }, \

                  findEditText: EditText { text:'', characters:20, alignment:['fill','center'] }, \

                      }, \

                                      findRow: Group { \

                  alignment:['fill','top'], \

                  findStr: StaticText { text:'Olive occlusion:', alignment:['left','center'] }, \

                  findEditText: EditText { text:'', characters:20, alignment:['fill','center'] }, \

                      }, \

                                        findRow: Group { \

                  alignment:['fill','top'], \

                  findStr: StaticText { text:'Browse for movie:', alignment:['left','center'] }, \

                  findEditText: EditText { text:'', characters:20, alignment:['fill','center'] }, \

                      }, \

                                   }"

                                                         

                                myPanel.grp = myPanel.add(res);

                                myPanel.layout.layout(true);

                                myPanel.grp.minimumSize = myPanel.grp.size;

                                myPanel.layout.resize();

                                myPanel.onResizing = myPanel.onResize = function () {this.layout.resize();}

             

                                return myPanel;

                      }

                      var myScriptPal = myScript_buildUI(thisObj);

             

                       if ((myScriptPal != null) && (myScriptPal instanceof Window)) {

                                myScriptPal.center();

                                myScriptPal.show();

                                }

                      }

             

                      myScript(this);

            }

             

             

            • 3. Re: any good websites for scripting buttons and windows?
              //-- Michel -- Community Member

              Hi, here you will find all about buttons and drop down menu

               

              http://www.kahrel.plus.com/indesign/scriptui.html

               

              ExtendScript Toolkit is the same for InDesign or After Effects.