4 Replies Latest reply on Jan 18, 2016 1:55 PM by Schmaltzkopf

    How do I add a ME textbox?

    Schmaltzkopf Level 1

      Hi, there.

      I am using ID ME. When I use the UI, I have the option of creating a standard text-frame by using the Type tool,

      and the option of creating a "ME text-frame" by using the ME Type tool.

      How can I script a ME text=frame?

      I understand that I can script a regular text-frame, and then change the paragraph direction, etc. but I figure, if there is a shorter way...

       

      Thank you.

        • 1. Re: How do I add a ME textbox?
          TᴀW Adobe Community Professional & MVP

          I don't think there is any such thing as an ME text frame. It's just a UI convenience that, as you say, creates a text frame, assigns a RTL paragraph direction, and assigns an RTL story direction.

          • 2. Re: How do I add a ME textbox?
            Trevorׅ Adobe Community Professional

            Hi S,

             

            Ariel  is right there's no such thing as a ME text frame.

            If anything there's a ME story.

             

            var meStoryProps = {
                paragraphDirection: ParagraphDirectionOptions.RIGHT_TO_LEFT_DIRECTION,
                characterDirection: CharacterDirectionOptions.RIGHT_TO_LEFT_DIRECTION,
                keyboardDirection: CharacterDirectionOptions.RIGHT_TO_LEFT_DIRECTION
            }
            
            var doc = app.properties.activeDocument || app.documents.add();
            // add "ME" textFrame to 1st page of Doc
            var meTextFrame = doc.pages[0].textFrames.add({geometricBounds: ["10mm", "10mm", "100mm","100mm"]});
            meTextFrame.parentStory.properties = meStoryProps;
            

             

            If you have a few ME stories to setup you can just store the properties and then assign them to the frames parentStory

             

            HTH

             

            Trevor

            • 3. Re: How do I add a ME textbox?
              Laubender Adobe Community Professional & MVP

              Hm, I assumed in an ME version it depends on the preferences, if you add a new text frame, that this frame has RTL directions.

              Also the binding option, etc.pp.

               

              As defined in:

               

              app.documentPreferences.pageBinding   PageBindingOptions.RIGHT_TO_LEFT

               

              app.textDefaults.characterDirection   CharacterDirectionOptions.RIGHT_TO_LEFT_DIRECTION

              app.textDefaults.composer

              app.textDefaults.digitsType

              app.textDefaults.kashidas

              app.textDefaults.keyboardDirection

              app.textDefaults.paragraphDirection

              app.textDefaults.paragraphJustification

              app.textDefaults.paragraphKashidaWidth

               

              app.storyPreferences.storyDirection   StoryDirectionOptions.RIGHT_TO_LEFT_DIRECTION

               

              Could be, that I missed some…

               

              You can look up all these here:

              http://www.jongware.com/idjshelp.html

              InDesign ExtendScript API (10.0)

              InDesign ExtendScript API (11.0)

               

              Uwe

              • 4. Re: How do I add a ME textbox?
                Schmaltzkopf Level 1

                Thank you Trevor. The link to ME scripting guide that you sent me had the "meat-and-potatoes" for what you said (and for what Laubender said), but I appreciate that you put it into the story properties.

                 

                Thank you again,

                All the best