Highlighted

Select textframe in framemaker.

Community Beginner ,
Apr 27, 2018

Copy link to clipboard

Copied

How do I select all text frames in framemaker using extendscript ?

TOPICS
Scripting

Views

506

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Select textframe in framemaker.

Community Beginner ,
Apr 27, 2018

Copy link to clipboard

Copied

How do I select all text frames in framemaker using extendscript ?

TOPICS
Scripting

Views

507

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 27, 2018 0
Adobe Community Professional ,
Apr 27, 2018

Copy link to clipboard

Copied

What is the overall thing you are trying to accomplish?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 27, 2018 0
Community Beginner ,
Apr 27, 2018

Copy link to clipboard

Copied

Hi ,

I need to add and remove textframe in framemaker when page zoom and fit in page window process,and i want to move the textframe in page of the bottom in framemaker using extendscript.So please suggests if any ideas.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 27, 2018 0
Adobe Community Professional ,
Apr 27, 2018

Copy link to clipboard

Copied

With ExtendScript, you don't really have to select a text frame to move it like you do in the interface. If you get the TextFrame object in a variable, you can change its LocX, LocY, Width, and Height properties to move it and resize it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 27, 2018 0
Adobe Community Professional ,
Apr 27, 2018

Copy link to clipboard

Copied

Here is how you can add a text frame to the current page:

#target framemaker

// Get the active document object.

var doc = app.ActiveDoc;

// Define variables.

var page, textFrame;

// Get the current page.

page = doc.CurrentPage;

// Add a text frame to the page.

textFrame = doc.NewTextFrame (page.PageFrame);

// "Mark" the text frame so you can find it later.

textFrame.Flow.Name = "zoom_frame";

// Use the LocX, LocY, Width, and Height properties

// to position and resize the text frame.

// ...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 27, 2018 1
Adobe Community Professional ,
Apr 27, 2018

Copy link to clipboard

Copied

Here is how you can find the text frame you added earlier and delete it:

#target framemaker

var doc = app.ActiveDoc;

var page, textFrame;

// Set a variable for the current page.

page = doc.CurrentPage;

// Try to find the text frame with the "zoom_frame" text flow.

textFrame = getTextFrame (page, "zoom_frame");

// If the text frame is found, delete it.

if (textFrame) {

    textFrame.Delete ();

}

function getTextFrame (page, flow) {

   

    // This function will find a text frame that

    // has a specified flow name on the page.

   

    var graphic;

   

    graphic = page.PageFrame.FirstGraphicInFrame;

    while (graphic.ObjectValid () === 1) {

        if (graphic.constructor.name === "TextFrame") {

            if (graphic.Flow.Name === flow) {

                return graphic;

            }

        }

        graphic = graphic.NextGraphicInFrame;

    }

}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 27, 2018 1