work with Smart Text Reflow

Did someone managed to trigger/Wait for smart text reflow scripted, in a useful way?

Here's some of my code:

   //find docType headers and apply keep
      app.findTextPreferences = app.changeTextPreferences = NothingEnum.NOTHING;
      app.findTextPreferences.findWhat = "<docType:TaggedRTF>";
      app.changeTextPreferences.startParagraph = StartParagraph.NEXT_ODD_PAGE;
      myStory.changeText();
      //fix tables
      if (myStory.tables.length) {
       /// proceess tables, code too long, not important

        }
      }
      // wait for smartReflow
      // how? it seems to be triggered only on idle?

      //now check if story overflows    
      if (myStory.overflows) {
        alert('This story has overset text. Please fix before running WordRunner');
      } else {
        // no overflow, proceed with breaking stories

I can always alert. Smart reflow begins only after the script has stopped running.

so... waiting for a redesign or smart text?

I tried to use $.sleep... does not work

I tried to see that a backgroundTask is not triggered... If not.

I'm lost and much annoyed.

My only option, for now, is to ask the user to click a button after the text was reorganized. And it sucks!

Please please please someone help!

Well... This works. It's a cludge ugly, but at least it works. I write a code snippet, because ' we saw a lot of discussions on the same subject and maby someone else will find it useful.

 // save old recompose and set new one
      var myOldSmartText = app.activeDocument.textPreferences.smartTextReflow;
      app.activeDocument.textPreferences.smartTextReflow = true;
      app.activeDocument.textPreferences.addPages = AddPageOptions.END_OF_STORY;
      app.activeDocument.textPreferences.deleteEmptyPages = true;
      //find docType headers and apply keep
      app.findTextPreferences = app.changeTextPreferences = NothingEnum.NOTHING;
      app.findTextPreferences.findWhat = "";
      app.changeTextPreferences.startParagraph = StartParagraph.NEXT_ODD_PAGE;
      myStory.changeText();
      //fix tables
      if (myStory.tables.length) {
/* long code to process tables, not interesting
**
**/

      }
     //process style rules

/* long code to preformat text, add/remove space after headings, lists, blocks etc.
**
**/
      // save old preflight options, add new ones
      var oldPreflight = app.activeDocument.preflightOptions.properties;
      app.activeDocument.preflightOptions.preflightOff = false;

     // wait a maximum of 40 second for the preflight process. Before it runs, the (not so)Smart  Text Reflow should kick into action.
      app.activeDocument.activeProcess.waitForProcess(40);
      //stop preflight for a bit more performance?
      app.activeDocument.preflightOptions.preflightOff = true;
      //now check if story overflows? (maby you have a very large cell in a table? some wierd keep options? bad things happen

Can I mark my own answer is right?

Tags: InDesign

Similar Questions

  • Smart txt reflow - how do you work with several text boxes?

    Hello

    I create ID cards to work, for 650 employees. I had used the reflow of text before smart on other jobs and I don't foresee any problems with its use for this project. To explain my problem:

    I'm doing a template with a trial of ten employees file. The design on each card, it is a name and a unique ID to be used. The name is 18pt and code 10pt.

    On my main page, I have a block of text for the name and a text block for the employee ID. The text blocks are as wide as the work plan but only high enough to adapt to a single name by image to the relevant point size.

    On the first page of my document, I select 'place' and then select the text file with all the names, I get the change of cursor in the image of the text, I hold SHIFT for the debit option and click on my name text box. InDesign automatically creates 9 new pages, and I now have a 10 page document. So far, perfect.

    I select "place" again, choose the employee code text file, click on my block of text in code used on the first page, and repeat the same process as above.

    My problem starts - I want codes for the employee to just flow through ten pages, as the names, but when I place the codes file and select the text on the first page, inDesign creates 10 new pages after the tenth page. So I find myself with 20 pages - the first ten pages with names and nothing in the code text boxes and the last ten pages with the codes but nothing in the name text boxes.

    I am at a loss as to why he does this. I was playing with the settings in the preferences, but nothing changes. I tried to select both the two text files and import at the same time.

    How do you work with several text boxes and several import of text file on a doicument? There are no extra spaces or something like that in my text files.

    I really don't want to have to link all text blocks - that will forever, but right now it's the only way I can get it to do what I want.

    Also, is there anyway to specify the font and the size of the text is important as? Because it keeps import as minion pro, even if the text boxes on the master are set to the correct font and size. Not a big deal though.

    Help, please! Any help is appreciated, thanks in advance!

    Ah, I think I misunderstood your original post and thought you wanted to do 10 badges per page. If it's only one, you need only a set of images. Same procedure for setting in place, but you have no need to screw anything or use the step and repaet to make copies.

    Place the file name in the frames of name and ID will add pages and then return to the first page and place the numbers. Just don't forget to put the bad slider in the space where the framework and to stay away from the guides (if you click on a guide, ID will ignore masters executives) and hold down the SHIFT key when you click.

  • Smart Text Reflow stops working in the middle of my Documnet

    I broke one of the primary text on my master pages by typing a space inside character (which took quite awhile to see), but now I have overset text on the primary text with smart reflow power block. Why? And when I try to add a new page manually it does not contain any kind of textframe (primary or normal) that I expect to come from the main text on the master page frame. These two could be independent.

    Also, when juggling the Smart Text Reflow preferences turing on and off 'Delete empty Pages' document has just started gradually adding empty pages one after the other 70 or more before I noticed and off Smart Text Reflow and delete the pages manually.

    Any thoughts would be much appreciated.

    Signed, A.O.A.D. (always on a date deadline)

    So, I just corrected it to reinvest the end on the main text block. (Shift-click) Seems easy now. I guess that seen with text overset text reflow smart power threw me a bit. Everything is fine now.

  • Adding pages and blocks of text to emulate the behavior of "Smart Text Reflow"

    I create a large number of tables in a document.  If I'm Smart Text reflow on, my script is malfunctioning.  I have the start of treatment:

    1. Add a new table

    2. If the last block of text of page overflowing and then add a new page

    With smartTextReflow off, I want to assure that the executives of new blocks of text which corresponding to the main text of the page master.  It must be able to manage to get the settings from the page of left/right text block.

    I have solved my problem.  I was overthinking things!

    Given that I have selected blocks of text on master pages as the main text blocks, when you create a new page, a block of text is automatically created. So the problem is then simply connect the block preceding text for the text block that was created when the page is added.

    TableAutomation.prototype.AddPage = function() {
         var previousTextFrame = app.activeDocument.pages[-2].textFrames[0];
         var np = app.activeDocument.pages.add();
         var textFrame = np.textFrames[0];
         previousTextFrame.nextTextFrame = textFrame;
    };
    

    The cost of the above code was about 5 hours of banging my head against the wall

  • To work with the text to the assignment by the cursor of the large fragment of page it is necessary to change all the time down, 'against the judgment", but the page automatically does not start to rise upward, as happens in other browsers. I ask you for

    After the transition to Windows 7, there was a problem with Firefox. To work with the text to the award by the cursor of the large fragment of page it is necessary to change all the time down, 'against the judgment", but the page automatically does not ascend to the top as it was earlier, and like that occurs in other browsers. It is necessary to press the other key "down" which is him very troublesome. Resettlement on an earlier version (8.0) earlier irreproachably working, gave nothing. I ask you to help

    You must activate the module bar (Firefox > Options or view > toolbars;) CTRL + /) or find bar to make Firefox scroll the page while selecting the text (Ctrl + F).

  • I would like to know, if the first 14 elements still work with Smart Sound? Thanks for a response!

    Hello, I love to give the music to my videos with Smart Sound Sonicfire. It works perfect in first 11 elements. So before buying 14 items first, I would like to know, if this still works with Smart Sound.

    Sorry for my bad English!

    First 14 elements has no interface directly with SmartSound, like older versions of the program. The program now includes Scores, that is Adobe tool for the creation of custom music titles.

    However, if you copy a piece of music for SonicFire as a WAV, you will be able to import that WAV in your Premiere Elements project.

  • How to merge data to work with Arabic text

    I need to make use of the data merge tool for a project I'm working on, but it involves the creation of documents in English and Arabic. I created a CSV (with Excel and OpenOffice) with English and Arabic text in there, but when I use it as a Data Source, the English is fine, but comes from Arabic in lines, points mark or arbitrary characters. I have UK InDesign CS6 and also a test of InDesign ME CS6, but doesn't seem to work. Any help would be massively appreciated.

    I have never tried to work with Arabic text, but my suspicion is that the problem lies in the data file, not necessarily in InDesign.  I don't know how your data file has been created, but my instinct would be to record from Excel as Unicode text, if that's an option avaialable you. This should give you a tabs-delimited text file that keeps the characters in extensive ranges required for Arabic, I think.

  • How can I work with unicode text?

    Hi, is there a plugin for InDesign CS4 make unicode work in my document? Its really hectic trying to work with fonts so it ' be easier if I get unicode text for work in my document. PLS, let me know if there is any plugin.

    What do you exactly by 'as it is'? There is nothing magical about Unicode. If you see a lot of pink boxes after pasting your text, this means that the fonts you are using does not contain a lot of characters. You can set some GREP styles that assign some fonts Unicode at some beaches. Or use some queries of GREP find/replace to assign character styles to the Unicode beaches.

    Peter

  • Delete pages with empty text boxes that are threaded

    I tried the program and the forum and that you do not see the answer to what is probably a simple question.

    First the bottom -.

    I get files InDesign 100 + pages created with boxes of text block. I have change for a bigger and the text moves with the largest areas of text, everything as I want it.

    The problem now is, I have a lot of empty pages with empty text in them block boxes. When I try to delete the pages in the menu layout by selecting all empty it won't make more than one! (Because of the block of text boxes, I think.) There is often more than 100 when I'm through with my changes.

    Now the question-

    How can I easily get rid of the excess pages quickly?

    Thank you for your help

    Personally, I would not go the script. Course of thread should not affect the ability to remove any image and drilled it now which is threaded will cause just a nightmare on the road.

    That said, you should be able to open the pages Panel and select 'empty' pages at the same time by clicking on the first, then now Shift on the last. Then click on the trash bin icon. It is likely that you will get a warning indicating that the pages are not empty (they should have empty blocks of text on them). At this time it's OK to say go ahead and delete anyway. If you are worried, make a copy of the doc and do about it.

    If you are unable to get these pages to be deleted, it probably means that Smart Text Reflow is at work, so check if you have enabled delete empty pages in the preferences, or turn off completely. In the stop-coincidence one of these pages actually contained text put on to your pages, you will see an indicator of excess some hand (probably the last picture), then place the cursor at the end of their coaching to excess and press Ctrl (CMD on Mac) + Y to open the story editor and look to see what is actually in excess. If it is important, such as a table, for example, you need to understand why he was invisible (post another topic)., otherwise, select and then delete.

    If you are not able to delete several pages after messing around with the Smart Text Reflow settings, try replacing your preferences and check again the smart text reflow settings, and then try again.

  • How to activate the reformatting of the smart text for all documents in a book?

    I have hundreds of documents I need to turn on Smart Text Reflow. Is it possible, via a script that I can activate this setting automatically, so I don't have to do it manually for each unique document?

    Ideally, I could run the script for each book file and be done with it.

    Thank you very much!

    Screen Shot 2016-01-19 at 12.57.43 PM.png

    Add them to one of the scripts:

    doc.textPreferences.addPages = AddPageOptions.END_OF_STORY;
    doc.textPreferences.limitToMasterTextFrames = true;
    doc.textPreferences.preserveFacingPageSpreads = false;
    doc.textPreferences.deleteEmptyPages = false;
    


    doc for Vamitul of the script, [i] docs for my version.

  • CS4 Photoshop creation work way w/text on a path

    I don't have a problem with the creation of a work path when working with standard text, but I can't get the opportunity to come in trying to work with the text that I have created following a path. Isn't this possible? If anyone can help! Thank you.

    It should be possible and seems to work even in cs - cs5.

    If you make your way and enter in the path of access, and then with the selected text tool

    you right-click on the type, the option to create Workpath is not available?

    If you have just the active text layer, but not the selected text tool, you should be able

    to go to layer > Type > create Workpath.

    If it still does not work, maybe a screenshot will prepare things up.

    MTSTUNER

  • Sometimes a web page is displayed with only text and no picures. It is not always the same site and is not always the case. If I'm going to explore for the same website that always works

    Sometimes a web page is displayed with only text and no picures. It is not always the same site and is not always the case. If I'm going to explore for the same website that always works

    Hello

    Also try a Ctrl + F5 refresh. This allows to bring the content of the page again.

  • Firefox itself 3.6.9 upgrade and now I can't print anything from an open page, because HP Smart Web printing does not work with this version. What is an extension of replacement?

    "An unknown error has occurred while printing."

    See this:

    http://KB.mozillazine.org/Problems_printing_web_pages

    The lack of compatibility of the HP Smart Web printing add-on shouldn't stop a printer HP to work with Firefox - all you lose is this stupid floating toolbar and adds some features.

    File > print or {Ctrl + P} should begin printing again, so all you have to do is make sure that the correct printer is selected, and then click the OK button.

    My advice is to try to the reset mentioned in this article.

  • my selection talking has stopped working with text messaging

    my selection talking has stopped working with text messaging

    Hi, plumberboy58.

    Please visit Apple support communities.

    I understand that you have a problem with the selection of talk.  Let's start by making sure that talk of selection is always enabled in settings > general > accessibility > speech.

    Talk about selection

    If talk about selection doesn't always show when you select a text message, forces all applications to close and restart your iPhone.

    Force an app to close the iOS

    See you soon

  • ASUS smart enrich your life works with 8.1 Overview

    I recently bought Asus smart enrich your life and I want to update 8.1 Overview I have a few questions. first completely will work with the 8.1 update (camera, USB, micro SD, audio etc..) SECOND, I will BE ABLE TO UPDATE TO THE FINAL VERSION WITHOUT ANY COMPLICATIONS.

    First of all, I would not recommend installing Windows 8.1 Preview because it is still in beta test phase and is not stable and ready for release.

    Do not rush into the madness of everything around here.

    You have the time to update correctly, wait a few days or a few weeks better.

    8.1 Overview of Windows FAQ http://go.Microsoft.com/fwlink/p/?LinkId=301773 

    Download Windows 8.1 Overview - ISO:

    http://Windows.Microsoft.com/en-us/Windows-8/preview-download

    `~`

    The time and date of this moment in the United States, California is 09:14

    Saturday, June 29, 2013
    The time Pacific daylight time (PDT)-0700 UTC
    UTC/GMT is 16:14 on Saturday, June 29, 2013
                
    Current weather conditions in Los Angeles

    Just20 ° C / 68 ° F
     

Maybe you are looking for