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?
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
Maybe this is something worth looking at? (:
@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
North America
Europe, Middle East and Africa
Asia Pacific