5 Replies Latest reply on Mar 27, 2015 1:51 AM by milligramme

    How can I set this, thanks!

    detekOoo

      I wanna to use script to set this, but I can't find what methods to use. Anyone should help me, please?

       

      image.jpg

        • 1. Re: How can I set this, thanks!
          milligramme Level 3

          Hi

           

          it is possible to set 'composer' property with a String value

          in Japanese version, following code works,

          please try in your language.

          thank you


          var doc = app.documents.add();
          var pstyle = doc.paragraphStyles.add();
          $.writeln(pstyle.composer); // => Adobe 日本語段落コンポーザー
          pstyle.composer = "Adobe 日本語単数行コンポーザー";
          $.writeln(pstyle.composer); // => Adobe 日本語単数行コンポーザー
          
          • 2. Re: How can I set this, thanks!
            detekOoo Level 1

            thanks, milligramme, it works.

            • 3. Re: How can I set this, thanks!
              milligramme Level 3

              good!

              please check as Correct Answer to close this thread.

               

              thank you

              • 4. Re: How can I set this, thanks!
                Laubender Adobe Community Professional & MVP

                @Milligramme – there are also locale-independent strings for both Japanese composers:

                 

                "$ID/HL Single J"
                "$ID/HL Composer J"
                

                 

                Did a test in InDesign CC v9.3.0 (German) and applied the "Adobe Japanese Single-line Composer" to a paragraphStyle by scripting.

                 

                myParagraphStyle.composer = "$ID/HL Single J";
                

                 

                Adobe Japanese Single-line Composer-ADDED.png

                 

                This is not possible working in the UI only.

                Don't know, if I ever would need something like that, but I think it's worth mentioning.

                 

                Uwe

                • 5. Re: How can I set this, thanks!
                  milligramme Level 3

                  @Laubender

                   

                  nice! I could get those CONST?  by this script

                   

                  var key_string = app.findKeyStrings("Adobe 日本語単数行コンポーザー");
                  
                  $.writeln(key_string); // => $ID/HL Single J
                  
                  
                  
                  
                  

                   

                  and in the same way

                  CS5 doesn't  has "Adobe World-Ready Single-line Composer" yet.

                   

                  // "Adobe World-Ready Single-line Composer"
                  // app.findKeyStrings("Adobe 多言語対応単数行コンポーザー")
                  pstyle.composer = "$ID/HL Single Optyca";
                  
                  
                  

                   

                  I could add "Adobe World-Ready Single-line Composer" to the paragraph style,  but I don't know it works or not.

                   

                  thank you