Skip to main content
Inspiring
January 17, 2016
Answered

How do I add a ME textbox?

  • January 17, 2016
  • 2 replies
  • 755 views

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.

This topic has been closed for replies.
Correct answer Trevor:

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

2 replies

Trevor:
Trevor:Correct answer
Legend
January 18, 2016

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

Inspiring
January 18, 2016

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

TᴀW
Legend
January 17, 2016

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.

Visit www.id-extras.com for powerful InDesign scripts that save hours of work — automation, batch tools, and workflow boosters for serious designers.
Community Expert
January 18, 2016

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