Skip navigation
Priyanka@Mediawide
Currently Being Moderated

how to highlight State of Multi-State object?

Jul 31, 2012 5:07 AM

Tags: #cs5.5

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?

 
Replies
  • Currently Being Moderated
    Jul 31, 2012 5:33 AM   in reply to Priyanka@Mediawide

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 31, 2012 5:50 AM   in reply to Priyanka@Mediawide

    Ahh I see! Sorry about that!

     

    I am also looking for some programming advice!

     

    Good Luck!

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 31, 2012 6:05 AM   in reply to tim.hughes

    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? (:

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 31, 2012 10:03 AM   in reply to Priyanka@Mediawide

    @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

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points