5 Replies Latest reply: Jul 31, 2012 10:03 AM by Laubender RSS

    how to highlight State of Multi-State object?

    Priyanka@Mediawide

      hi,

       

      I have created 3 states of object State1, State2, State 3. and want to highlight state in object state panel programmatically. can any one have idea abt it?

        • 1. Re: how to highlight State of Multi-State object?
          tim.hughes Community Member

          Hi there

           

          Select your multistate, then in the Object states panel, click through til the state you want - it's basically like a group within a group - so keep on clicking until you highlight the part you want!

           

          Tim

          • 2. Re: how to highlight State of Multi-State object?
            Priyanka@Mediawide Community Member

            Thanks tiim for reply.

             

            but I want to do it programmatically. Do you know any Interface or inbuild function to highlight state?

            I can get number of states and name of states using functions.

            • 3. Re: how to highlight State of Multi-State object?
              tim.hughes Community Member

              Ahh I see! Sorry about that!

               

              I am also looking for some programming advice!

               

              Good Luck!

              • 4. Re: how to highlight State of Multi-State object?
                tim.hughes Community Member

                Are you on a Mac?

                 

                 

                There is a program called AppleScriptEditor

                 

                if you open that, then go go

                 

                file > open dictionary > Adobe Indesign CS"your version"

                 

                It tells you all the apple script commands you can use with inDesign

                 

                 

                If you look through the dictionary to

                 

                "Interactive Elements Suite" and then within that "multistate object" there are lots of things to choose from

                 

                Screen shot 2012-07-31 at 14.01.17.png

                 

                Maybe this is something worth looking at? (:

                • 5. Re: how to highlight State of Multi-State object?
                  Laubender CommunityMVP

                  @Priyanka – you did not mention a specific scripting language.
                  In ExtendScript (JavaScript) you can set the "active" property of the 3rd state of your MultiStateObject to value "true".

                   

                  //ExtendScript (JavaScript) example

                  //Make sure a MultiStateObject is selected; nothing else, then run this JavaScript:

                   

                  app.selection[0].states[2].active = true;
                  

                   

                  The expression from left to wright (for lurkers who never saw a line of code):

                   

                  app => application (that's InDesign, of course)


                  selection => your current selection in the UI (could be one item, could be many)

                   

                  [0] => index number 0 is the first item in your selection; be cautious with the expression "first", it depends on the InDesign version what that does exactly mean, if you selected more than one object

                   

                  states => obviously the "state" object (always with the plural "s", it's the collection of all states in that selected MultiStateObject)

                   

                  [2] => index number 2 is the 3rd element of the states collection

                   

                  active => property for the active status; boolean, could be "true" or "false"

                   

                  = => with the "=" sign, you are setting the value

                   

                  true => the value of the property; self-explanatory, I hope…

                   

                  ; => end of expression, all that comes after is a different expression.

                   

                  The different parts are held together with a dot-notation. The index  is directly glued to its object, no dot notation between object and index.

                   

                  If you want learn more about ExtendScript and the InDesign DOM see Jongwares' documentation at:

                   

                  http://www.jongware.com/idjshelp.html

                   

                   

                  Uwe