1 Reply Latest reply on Aug 31, 2012 8:05 AM by Laubender

    How to access the MSO slideshow controls in Indesign JavaScript


      Hi friends,


      How can access the slideshow controls.


      function mso_html_convertion_slide_show() {


              var mso_total_count = MSO.states.length;


                for (var i = 0; i < mso_total_count; i++) {









      Thank you.


      [ Nav ]

        • 1. Re: How to access the MSO slideshow controls in Indesign JavaScript
          Laubender Adobe Community Professional & MVP

          @Nav_alm – you'll do that by the JavaScript (ExtendScript) method



          Keys and values can vary regarding DPS  and/or InDesign version.


          To examine a specific object (in your case a MSO) for keys and values already set, export the MSO to IDMS and check for the <Label> … </Label> tags.


          Or you can extract a value, if you already know the key ;-)


          An example for DPS v21 / InDesign CS5.5 for setting or extracting a value:





          var myValueString = myMSO.extractLable("AutoStartDelay");
          //Result for the example above would be the String object "5"


          The SlideShow Panel will read out that label of the MSO and reflect that in the UI after a refresh (close the panel, open the panel).


          Note: if you extract a value like that in the example above, you always get a String object. Even if it's looking like a number.


          That's just the basic thing. But in detail it's a bit more complex, because the Overlay Panel software will assume some defaults that are not set and show these, even if you did not set them explicitly.


          For example:

          when DPS is installed and you open a document with an MSOs, instantly every MSO is becoming a slide show and  a appropriate key/value pair is attached.


          You  can add key/value pairs or change values of keys, but you cannot remove key/value pairs other than exporting to IDMS or IDML, delete the labels in the XML and place the snippet (IDMS) or open the IDML as a new fresh document.


          Key/value pairs can grow in numbers, if new versions of DPS are issued (every 6 to 8 weeks) and new features will be introduced. Or they can change, if you compare DPS for InDesign CS5.5 with DPS for InDesign CS6.

          Therefore scripts written for one version could fail or result in unwanted results in future versions ("future" could be a very short time frame from 6 to 8 weeks).