13 Replies Latest reply on Apr 26, 2015 11:41 AM by Pickory


    Pickory Level 3



      In the SDK you can access a WaxRun, here is how the documentation describes a waxrun.


      wax run is created each time the appearance of the text changes within the line. Examples of this include changes in point size, changes in font, and the interruption of the flow of text in a line because text wrap causes text to flow around another frame. "

      A textStyleRange doesn't quit do it.

      Any way to get this via scripting?

      Thank you.



        • 1. Re: WaxRun
          TᴀW Adobe Community Professional & MVP

          Not that I know of.


          textStyleRange is the best you've got.

          • 2. Re: WaxRun
            Pickory Level 3

            I thought so.


            Shame, I wanted to keep that part as a script.


            I wonder if I can connect my C++ with the scripting lines array. So I could have some thing like this.

            var waxArray = lines[n].getwaxarray ( );


            Thank you.



            • 3. Re: WaxRun
              TᴀW Adobe Community Professional & MVP

              That is beyond my ken.

              • 4. Re: WaxRun
                Laubender Adobe Community Professional & MVP

                I do not agree. Ok, you can say: TextStyleRange is the *next best thing* you can get, but I think:

                TextStyleRange cannot be trusted, if it comes to nested styles and GREP Styles.



                • 5. Re: WaxRun
                  Pickory Level 3

                  Hello Uwe,


                  I have gone through the nested, nested GREP style loop and have some thing working, but, I do know what you mean.... It does not tell where the run has been modified by an external source.  From the SDK, Waxruns seem to offer this, including all of the nested and GREP runs.


                  A new plugin is being born.



                  • 6. Re: WaxRun
                    Loic.Aigon Adobe Community Professional

                    I wonder if I can connect my C++ with the scripting lines array.

                    The Javascript Documentations states it but could never give it a try:


                    // Integrating External Libraries (page 200 of JavaScript Tools Guide CC.pdf )

                    You can extend the JavaScript DOM for an application by writing a C or C++ shared library, compiling it for

                    the platform you are using, and loading it into JavaScript as an ExternalObject object. A shared library is

                    implemented by a DLL in Windows, a bundle or framework in Mac OS, or a SharedObject in UNIX.




                    • 7. Re: WaxRun
                      Pickory Level 3

                      Hello Loic,


                      Thank you for taking the time to think about it.


                      I was hoping to keep this part of the application as a script, but it does look like we will have to talk to the plugin.


                      We already have the C++ plugin doing some work, so it will not be too much effort to get this bit working. The plugin will probably be faster at iterating over the style runs anyway.



                      • 8. Re: WaxRun
                        Dirk Becker Level 4


                        that external library mechanism allows to write plugins to the ExtendScript engine rather than to InDesign, e.g. if you have some standalone code library and want to use it in PhotoShop, InDesign and Illustrator across all versions. The disadvantage of that approach is that you don't have access to the application internals - and Pickory is probably talking about that kind of plugin.

                        • 9. Re: WaxRun
                          Loic.Aigon Adobe Community Professional

                          HI Dirk,


                          Understood. I have this feeling indeed It might not be able to access internals but as I couldn't test it on my own I thought that It was maybe worth the quote.



                          • 10. Re: WaxRun
                            Pickory Level 3



                            Indeed, we do need to access the internals, so we are going to use a C++ InDesign plugin. That said, we have got a prototype doing most of what we want through script. The main problem we can not solve with a script is when the line is broken in the middle by an item intersecting it.

                            Screen Shot 2015-04-19 at 17.47.49.png


                            Thanks for all the input on this.



                            • 11. Re: WaxRun
                              Dirk Becker Level 4

                              Then you should be more interested in parcels and tiles than in wax ...

                              • 12. Re: WaxRun
                                Pickory Level 3

                                Dirk, thank you for the pointer.


                                I haven't started coding this yet.


                                We are getting some very nice results from our script, so, not really sure if it is worth the investment in the plugin.


                                Thank you.



                                • 13. Re: WaxRun
                                  Pickory Level 3

                                  WaxLine and WaxRun did the trick.


                                  The key is to add the line x offset to the run x offset.


                                  Screen shot 2015-04-26 at 18.51.07.png

                                  The top image is a snap shot from the browser, the bottom is from InDesign.


                                  Thanks, everyone for your input.




                                  Screen shot 2015-04-26 at 18.12.10.png