[JS] Find/replace on all blocks of text on a single page?

Hello

Is it possible to perform a. changeGrep() on all blocks of text on a single page only?

This code gives me "myPageFrames.changeGrep () is not a function".

var myPageFrames = myNewPage.textFrames;

app.findGrepPreferences = app.changeGrepPreferences = null;

app.findGrepPreferences.findWhat = '. '. + » ;

app.findGrepPreferences.appliedCharacterStyle = myCharStyle;

app.changeGrepPreferences.changeTo = "myChangetoText";

myFinds = myPageFrames.changeGrep ();

Thank you.

Hello

change the 1st line:

var  myPageFrames = myNewPage.textFrames.everyItem();

alleged myNewPage is a 'Page '.

Jarek

Tags: InDesign

Similar Questions

  • Select all blocks of text related

    Dear all,

    My request:

    1. is it possible to select all the text frames linked to my block of text by selecting (see attachment)

    2 suppose that if we choose all the blocks of text, it is possible to set the height for all blocks of text such as 3 p or 4 p etc...

    Try the script to select all the linked text frames:

    If (app.selection [0] .nextTextFrame == null)

    {

    If (app.selection [0] .previousTextFrame! = null)

    {

    Alert ("Pass")

    App.Select (previousTextFrame.parent) & & app.select (nextTextFrame.parent) & & app.select (startTextFrame.parent)

    }

    }

    Screen Shot 2013-03-19 at 8.01.03 PM.png

    Could someone give you a solution for my application.

    Thanks in advance

    Beginner

    If you want to do is make managers of related related texts have all the same height, here's a way to do it:

    If (app.selection.length == 0) {}

    Alert ("Please select a textFrame before running this script");

    Exit();

    }

    mySelection var = app.selection [0];

    If (!) mySelection instanceof TextFrame))) {}

    Alert ("Please select a TextFrame before running this script");

    Exit();

    }

    var mySelection.parentStory = monarticle;

    var myFrames = myStory.textContainers;

    var nFrames = myFrames.length;

    for (ix var = 0; ix)< nframes;="" ix++)="">

    var myFrame = myFrames [ix];

    var limit = myFrame.geometricBounds;

    delimits [2] = limits [0] + 4;          Set the TextFrame 4 height units

    myFrame.geometricBounds = limit;

    }

    Stephen

  • Blocks of text on the Master Pages with CS3?

    I produce a catalog in CS3 on my Mac using OS Mavericks.

    I put in place of master pages with square 6 graphic blocks on each page. Each of them has a CAPTION below, in which I put up as a block of text. I clicked on "Apply Master pages", but when I go to the blocks of text pages are not displayed to the top. The only way I can enter captions on pages is by creating new blocks of text, 6 on each page, which is very tedious and time consuming. What I am doing wrong?

    Thank you.

    Welll...

    As bob says it is not Quark where you can just click to type in a main frame, but you CAN Cmd + Shift + click to override the main chassis and type in it. You might be better off, however, with a framework prédimensionnée and style in a library that you can drag onto the page and position. My feeling on frameworks masters get substitution is that they probably shouldn't be on the master page at all.

  • Can't add placeholder text data merge for all blocks of text on the document

    I'm trying to put together a script that loops if all pages in an indesign file, search all text frames label caption1, caption2, caption3... (whenever you get to a new page, the number of text images label starts again from 1) and add a placeholder in the text data fusion: caption1, caption2, caption3... but this time, when you get to a new page the number continues to go... caption4, caption5 and so on.

    Page 1 - image text = caption1 = tag > data merge placeholder = < < caption1 > >

    Page 1 - image text = caption2 = tag > data merge placeholder = < < caption2 > >

    Page 1 - image text = caption3 = tag > data merge placeholder = < < caption3 > >

    page 2 - text = caption1 = image tag > data merge placeholder = < < caption4 > >

    page 2 - image text = caption2 = tag > data merge placeholder = < < caption5 > >

    Currently, the script is adding placeholder text merge data only for the two text frames first (out of 6) on a page (about 8 pages) and just the first image of text on the page two (out of 3)

    Any help will be greatly appreciated

    Here's the script:

    myDocument var = app.activeDocument;

    -SOURCE DATA CALLS FUSION

    main();

    main() {} function

    myDataSource var = File.openDialog ("Please select a datamerge source", "text files: * .txt");

    If (myDataSource! = null) {}

    myDocument.dataMergeProperties.selectDataSource (myDataSource);

    myDocument.dataMergeProperties.dataMergePreferences.recordsPerPage = RecordsPerPage.MULTIPLE_RECORD;

    }

    }

    -MERGE OF DATA FIELD

    function get_field (captionString, myDocument) {}

    fields var = myDocument.dataMergeProperties.dataMergeFields;

    for (var f = 0, l = fields.length; e < l; f ++) {}

    If (fields [f] .fieldName == captionString) {}

    Returns the fields [f];

    }

    }

    Alert ("error: did not find all the fields with the name" + field_name);

    }

    THE TEXT - ADD PLACEHOLDER DATA MERGE

    var countFrames = 1;

    for (i = 0; i < myDocument.pages.length; i ++) {/ / TOTAL NUMBER OF PAGES in the DOCUMENT}

    var capPerPage = 1;

    for (x = 0; x < myDocument.pages [i].textFrames.length; x ++) {//COUNT TEXT TOTAL IMAGES PER PAGE

    If (myDocument.pages [i] .textFrames [x] .label < 0) {}

    Alert ('can not find any image caption');

    } ElseIf (.textFrames [x] myDocument.pages [i] .label == 'caption' + capPerPage) {//IF IT IS A TEXT LABEL of IMAGE 'caption1' EXECUTE

    var captionString = "caption" + countFrames;

    var myTextFrame = myDocument.pages [i] .textFrames [x];

    var myDataMergeProperties = myDocument.dataMergeProperties;

    var myTextFrame.parentStory = monarticle;

    var myStoryOffset = myTextFrame.parentStory.insertionPoints [-1];

    var myNamePlaceHolder = myDocument.dataMergeTextPlaceholders.add (monarticle, myStoryOffset, get_field (captionString, myDocument)); ADD DATA FUSION TEXT HOLDER TO THE TEXT BLOCK

    countFrames ++; INCREASE THE NUMBER TO ADD DATA FUSION TEXT PLACEHOLDER FOR THE NEXT BLOCK OF TEXT

    capPerPage ++;

    }

    }

    }

    Hello

    To verify this change (replace for...) loop)

    var countFrames= 0, currLabel, capPerPage;
    
    for (i=0; i
    

    Notice countFrames starts at 0.

    Jarek

  • How place a document that requires a block of text to span several pages?

    I'm working on an information folder and have a word doc that contains 3 or 4 pages of text I want to merge my flyer. No matter what I try, when the use of Place (command-B), I can't get the text block resulting automatically create pages as needed. I checked n the option of 'Smart Text reflow' preferences and unchecked option "limit of main text Frames". Deparation, I even created an empty text block, turned on the Auto for this image and copied sizing the command + V) text in, but he did not better. I would prefer not to have to divide the text into chunnks and put it in blocks of text separated on each subsequent page. Any ideas?

    I use CS6 on a new MacBook Pro running OS X Lion mountain with 16 GB of RAM.

    When you place the text, hold down the SHIFT key when you click on the page.

    Bob

  • Help w. blocks of text in the Master Page

    Hello

    I need to do a simple task, but it seems impossible.

    I do a large number of documents of the same type and stlye. Lets say, something like a certificate or diploma. They all have the same design, and the only thing that is different in them is the text in 2 areas that each text a. say that if we follow the example of certificate on each card, I have to put in the same text two boxes - 'the name of the person' and 'date '. So I have to set a beautiful master page with 2 text boxes that I can fill in for each card. Given that design can change, I need to be able to move the positions of the boxes on the master page, after I filled out their. I have to be able to change the case, the police and other properties of text in each box. For example, I when I have done 1000 certificates and filled respectively 1000 names and dates of receipt and then I decide that I must place the box with the name on a different position on the page and also to change the properties of the text, as Times New Roman to the Georgia. And to do it from the master page or another effective way without changing each certificate.

    So far I managed to place the boxes on the master page, and I saw that I can replace the text in each certificate and always be able to move the position of all the boxes on the master page. But I can't find a way to change the properties of text boxes.

    Thank you very much for your help!

    The trick is to not move the text block on the page of the document, or you need to move each one individually. If you want to move them all, move on the master page. If it's just a few, you need to move those appearing on the document pages and lose the connection to the master page.

    And you need to use styles if you want to make a change that will change everything. A paragraph style should do, unless you want different text within a paragraph attributes. In this case, apply styles of character for different pieces. And substitute styles locally.

  • All of the text is now a link and I can't remove it

    Muse has suddenly decided that all text on a single page is an important link. If I select the text and click the 'x' in the box link to remove it, it will look as if the link has been removed. And then in a moment it immediately reappears as a huge link again. I did not this text a link, and now I can not remove it. Any advice?

    Finally found the answer myself... it turns out that become whole text block in some way a link as well. Click on the image, remove the link. Problem finally solved!

  • Divide the long text into multiple blocks of text by PARAGRAPH breaks, and not by line breaks

    I'm creating a catalog of the auction. Right now I have a long table in Word, where each line is an item in the catalog.

    I know how to place the table in InDesign and convert it to text so that each line is its own paragraph (click table > > convert table to text).

    Now, I want to run a script so that each paragraph becomes its own text box.

    I tried to use the script of Jongware mentioned on this thread (https://forums.adobe.com/thread/652308), but it breaks to the top of each LINE in its own text box, not each paragraph.

    Previously, a solution that worked for me is to manually adjust the text boxes until each paragraph is in a separate box, then use the SplitStory script to remove all the. However, the catalog has over 100 articles in there it is time consuming. Is there a way to separate each paragraph into its own text box automatically?

    Well, I guess you can set up a master page with two frames of text related to this topic.

    To keep Options (see above), choose 'Start in the new framework' rather than 'new page '.

    Create a page in the document and apply the master page.

    Then follow the first set of instructions, I gave above. For autoflowing, click inside the box of one of the blocks of text on the master page (I mean, do it on a regular page that has the master page applied; the text block should appear with a dashed line, because it is on the master page). Now, all text should flow between these two images, two images per page which gives you 1 point in each image.

  • In Acrobat XI, how can I select and move multiple blocks of text/image at the same time on the same page?

    I work with PDF files generated by student requiring all content in a specific range of margin. Occasional tables and figures are indented or otherwise properly spaced so that the content violates the margin requirement. In Acrobat X, I could use the selection tool to draw a selection rectangle around all text and lines of a table for example and just drag the entire table over a little to meet the requirements without referring the PDF to the author for correction. It did not always work, but quite often that I was able to use it on a daily basis.

    Is it possible to select several (but not ALL) blocks of text and image on a page pieces, so they may be submitted at the same time? If I have to select each text block and lines (or each point and in a chart) and move them each individually, it's going to be a nightmare.

    I have Acrobat XI for Mac and Windows, but tend to use the version of Windows more often.

    People have reported what happens when preview of the output (I think) window is open. So you can close.  have not heard of another fix

  • Blocks of text on the Pages of body 'Buried' after update of the Page Master

    I have a background full screen on my main page (on the left in this case) that integrates static graphics and borders for certain master pages. I use the borders/boxes for NOTE and END of text on some pages. Blocks of text on these master pages do not overlap. I added text blocks with my icons and the text of the note to these body Pages that I need them. All great so far.

    I decided to update the background chart on page master to change colors, etc.. All files are linked.

    Now, with funds master page updated, these pages where I added text blocks are 'buried' as on a sublayer. I checked that my Master Page background images are "sent back". I tried to wear my text boxes at the front on the Pages of my body, but they are still hidden. Interesting as the anchored frame (the icon), I attached to each NOTE or TIP point appears, but the text is not. Also, I can see and select the contours of the block... the text is hidden. If I drag the fame to another part of the document (for example, on top of another Master Page text frame sank, while the text is displayed.

    There is no image on the master page to the enclosed area. I wonder if that's what I need trouble. Just add a backstory (not attached flow)?

    Advice before I go and screw something else?

    It is what it is supposed to look like (1). Image (2) what I mean now.

    V7Page2.jpg

    V7Page.jpg

    Thanks Arnis,

    It was the property of skin! How simple... I didn't have on this subject.

    Solved!

    To answer you question, however... my approach for the construction of this new model was:

    1. I created a graph from bottom (full page) to contain the image of brand and imported/positioned.
    2. I placed the header and a footer frame and filled with content.
    3. I placed the blocks of text with streams (as a single stream in this document).

    I'm not dropping blocks of text for the content of the body... except for these tips and remarks. I don't want to use a workflow for this because I never know where they'll pop up and I want to be able to (position) specifically on each page. Is this a good approach?

    Yes, I'm aware of the continuous line down the block of text NOTE you mentioned. Originally, I had all the text within the limits. When I have updated master, all offbeat pages (only in blocks of text body page with notes/tips). I repositioned and they flow very well now.

    Thank you very much for your help continues with it. Why these problems always pop nitpciky - up to date - not when things are slow!

  • Find/replace in book

    Hello

    Is it possible to search a find/replace on an entire book, without having to open all documents at the same time or make a PDF?

    I'm using CS3 on Mac.

    Make a PDF file would lead you nowhere

    No - the only option is to find/replace in all documents open. This does exactly what you have discovered.

    InDesign has no problem at all with a lot of documents to open - do it all the time.

  • Alert to variation of Muse - block of text - not supported

    Hello

    I just changed the text on my website to Verdana web fonts Dosis, which I installed it. DOSE does not have an italic version, which is fine. But wherever I used Verdana italic earlier and preview in a browser, I now get a warning will appear indicating, for instances of 36:

    «Block of text on the "Home" page uses a variation unsupported "italic" from edge Web font named "Dosis medium".» Italics will be simulated. »

    Seen in the browser these words that had already been put in italics when I used Verdana are now italicized in the dose in the browser. I do not see the warning (x 36) whenever I saw in the browser. I want especially to ensure that this do not cause any problems when I'm done with my design and publish it.

    Please notify.

    The italic shape of Dosis you see in the browser is a false "italics" artificially simulated by the browser sloping forms of the letters. This usually results in an unnatural feel compared to a true italic, but if you are satisfied with the appearance, feel free to use it; It will not have any other "problems." However, there is no way to silence warnings from the time of export, if you decide to go with the fake italics.

    Abhishek

  • Select a block of text with lable

    I'm coming down with a block of text from the document page 2 with label "main script text" but script below does not work.

    app.activeDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;

    app.activeDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;

    app.activeDocument.viewPreferences.rulerOrigin = RulerOrigin.spreadOrigin;

    Try

    {

    var jt = app.activeDocument.pages [2] .textFrames;

    for (i = 0; i < jt.length; i ++)

    If (.label jt [i] is 'Hand Text')

    JT [i]. TextFramePreference.autoSizingType = AutoSizingTypeEnum.HEIGHT_ONLY;

    }

    {catch (e)}

    Alert ("nothing happened");

    }

    Can you please help me what is the error here.

    Counting with numbers index starts with the number 0.

    So the second page is app.documents [0] .pages [1].

    Uwe

  • CS5 - most effective way to wire and independent streams of two blocks of text in the same document?

    Greetings...

    I am responsible for creating a 100-page instructor guide and I looking for a little guidance in the use of independent text blocks that thread the length of the document.  The idea behind the use of two columns, is that the first column (left) must be used for the notes 'instructor-only', advice, etc..  The second column (right) should be used for the text of the student guide.  Two columns (or blocks of text) would need to move independently of each other.  In other words, when the left column is filled with text placed on the page, the flow of additional text in the left column on page two, left column on page three, etc.  Same thing applies to the right column.  There is no link or thread of the text between the two columns on the same page.

    I tried to reproduce this in a two-column table format, however, the table row height is limited and overset text will not continue the table in the block of text on the next page.

    Thank you in advance for your help!

    Set up master page text frames.

    If you use facing pages, put on the student to the student and executive trainer instructor on master pages.

    Be very careful when your document is redéroule however. Take a look at this discussion, we had recently on the subject:

    http://forums.Adobe.com/message/3588735#3588735

    HTH,

    Substances

  • Print texts in different formats on a single page

    Hi all

    Is it possible to print on one page text in different fonts and sizes? It seems that PrintTextBuffer prints all text on a single page at a time and there is no chance to change the format. Thank you

    LT

    I must confess that I give you this suggestion, but I did not use these functions for several years ; test your function on my system now (CVI 2009SP1 on Win7 with HP LaserJet printer) I have the same results as you.

    Due to the limitations of this method of printing, I moved quickly to the other printing modes: there are many discussions you will find in the forums on the reports, but basically, you can:

    • Create a hidden Panel 'report' where to print your data on the standard controls (strings, numbers, graphs, tables and so on) and use PrintPanel to print it
    • Use NIReports instrument
    • Use Office report print (via Word or Excel)
    • Create a PDF file
    • ... (other methods that I can't think of right now)

    One is probably the fastest: you already used to create panels and after a short trial, you can set the correct control/panel aspect for a good report. It also allows you a limited preview if you want to.

Maybe you are looking for