[JS CS3] How to detect text flow?

Hello,
Here is a fun problem: I have a series of scripts that checks for various errors in formatting of an ID file. The errors are tagged with XML tags. Very nicely, none of the scripts change the text, just record the errors. This includes that the scripts do not create any text flow, for instance, pushing words from the bottom of one page on to the top of the next page. However, once in a while I have discovered that the text does flow. I do not think the problem is in the scripts but in some instability in the file. Most of the time there is no flow.
So, I would like to write a script that detects text flow. I do not expect anyone here to write it for me but I would like suggestions on the following scheme or if anyone has a better road to follow.
1. Upon opening a file, a script would record the number of characters in the last text frame of any multi-text frame story. This would establish the original state of the file. Getting the number of characters in the last frame is easy, but the thing to ponder is how to record? A .txt document could be created that contains that information, but then how do I use it? Perhaps better is to record the info in variables written by the script itself.
2. Anytime that the number of characters in the last text frame changes an alert would pop-up stating this. Perhaps a snippet of the first line of the last frame would be included in the alert to help the user find the problem (there could be several multi-frame stories in the document).
I would like to be able to turn on and off the alert. While editing there will be of course text flow. But while merely checking I do not want text flow but do want to know when it inadvertently occurs.
I know that such a script(s) would involve Event Listeners, something I have not used before.
Any suggestions? I'm just looking for pointers before I start on the road of writing this.
Thanks,
Tom

Yeah, I know what you mean. The "invisible" XML markers aren't exactly perfectly invisible -- perhaps they mess with the n-th digit of precision when justifying text, or something like that.
There still may be a minor flow between two successive text frames -- a single word that suddenly jumps to the next page, but paragraph spacing adjusts itself to keep the same number of lines.
A good idea, though. You could look into storing the number of characters per frame into the frame itself, as a custom label.

Similar Messages

  • How to get text flow onto the next page from template "travel journal"?

    When wanting to create a new document, I chose "Travel journal" between "side layouts" in templates. When it opens, you see one page with pictures and example of text.
    When I start to write my text in the text field, it disappears when I get to the end of the page.
    What do I do to have the text move/flow to the next page automatically?

    The "Travel Journal" template is a page layout document & uses text boxes. There is no default flow to another page. You need to insert a new page & then create a linked text box. You can link existing text boxes or create a new text box linked to an existing one. Click the linking triangle then click to create a new box or click an existing box to link to it.

  • [JS, CS3] How to find text that is NOT a paragraph return

    Hi all,
    This is probably an easy one, but I can't seem to get the idea. I want to search within some text and find everything EXCEPT the paragraph return. What would be the way to build that expression? Thanks for any response.
    Regards,
    Len Swierski

    Thanks, Peter!
    I appreciate your help but I have found another solution. I am amazed at my own stupidity sometimes. You see, I do my scripting in a very lame sort of way because I have never used Javascript outside of InDesign. As such, I find myself at a disadvantage because the documentation that Adobe provides assumes that you are aware of many of the basics. Case in point: I have always had trouble manipulating strings because I NEVER KNEW that you could search and replace strings! I just could not find examples of this in the Adobe documentation. So here I was in some cases adding temporary textFrames so I could get to my strings as text contents and then removing the temporary textFrames at the end of the script. In this particular case I needed to merge several paragraphs into one paragraph. Now that I know how to search & replace strings, it is so simple to strip away all the paragraph returns (which are included in text contents). I am learning, albeit rather slowly. Thanks again.
    Regards,
    Len Swierski

  • Text flow to additional pages at end of document, how to set up in InDesign CS5

    I've added additional pages to a document in InDesign CS5 -- but how do I set up my document so when text is supposed to get pushed to the additional pages the text flows from page to page on these extra added pages? Right now I've added additional pages to the end of my document and when the text from the original document gets pushed past the end it disappears and not continued on the additional pages.
    Thanks,
    Jeff

    P Spier wrote:
    Yeah, container may not be the best word to describe a book, which is why I put it in quotes, and I certainly didn't mean to imply that you can no longer open and edit the files outside the book. Doing that, however, means next time you open the book ID will complain and ask you to update things. No big deal, but if you open through the book panel it will save the changes through the book and that won't happen. No difference to the inidividual files.
    Historically - as in *roff and other UNIX-based processing programs like xroff, nroff, etc - books that were published from multiple individual component files, were produced by the use of a "makefile." You'd need to create the makefile by typing the names of the component files in the book order, along withtheir specifications, such as starting page side, starting page number, etc. You'd save the makefile with a name to preserve all this information, then you'd run the "make" command-line command in which you'd name the makefile, and include arguments such as which printer, how many copies, even a job priority, to avoid unnecessarily hogging the network bandwidth and free the printer for higher-priority jobs. As GUI capable hardware and software progressed, command-line makefiles became GUI book files - still, basically lists of component files and processing instructions.
    One important value of book files that don't contain component files is that different book files can control the processing of the same component files in different ways, as well as produce books that use some of the same files and some different files - for different audiences, different product sets, etc. Yes, opening a book file may warn that component files have changed - a good warning to the user to pay attention - and they offer a way to update the collection of component files so that the book file produces the desired result. Here's where some folks may be surprised when they find that sometimes a print or export dialog box, either retains or forgets the settings used for the previous run; the result may be printing multiple copies instead of one, printing to a different printer than expected, or exporting a PDF that's not suitable for the desired printer.
    The short story is that while book processing lists that are separate from the component files offer flexibility and reusability, but they also require that the user pays attention.
    Did I commingle Autoflow and Smart Text Reflow in some way? I didn't think so.
    Not at all. I'm just extra-sensitive to my own experiences with not having taking pains to keep clear on the differences between these similar-sounding terms.
    My point was that HOW your text was put into the file to begin with, coupled with how your settings for STR are configured, is going to control whether subsequent editing triggers reflow. It's possible to have STR enabled and not have it work because you've limited it to master text frames and you haven't actually used any. An understanding of how autoflow works when placing text is important to being able to troubleshoot why STR is not behaving as expected (not to mention why text frames may not be adjusting if you edit the master page).
    One reason for the confusions that come from working with Smart Text Reflow is that there's no indication in the UI, that STR is enabled, and when it's enabled, there's no indication in the UI of which STR settings are in effect, except by seeing the behavior. Are pages added at the end or story, section, or document? You may see them added in the Pages panel, if it's open, on screen, and if the appropriate portion of the document is in view; you may see them added on screen if the appropriate portion of the document is on screen - the end of story, section, or document.
    In InDesign's Help, Smart Text Reflow is covered in only a few paragraphs. As you noted, there's much more to it.
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • How long CSS blocks flow, from source which detected as source DoS?

    My application generates except normal flow, flow which CSS treats as DoS attack. Both flows have the same source.
    I am afraid that, CSS can block proper flow.
    So, I have question: how long CSS blocks flow, from source which detected as source DoS?
    Krzysztof

    I am not very sure of the lenghth of time that it blocks the flow from the source, if it is considered as a source of DoS attack, but the workaround would be to bypass the cache for that particular source, since you are already aware that it might cause a problem. You could use a bypass rule to do so. You can also use the flow timeout feature with the flow port[1|2|3|4|5|6|7|8|9|10] timeout command to configure a flow timeout value for a TCP or UDP port. I am not very sure if this feature would help in your situation, bypass seems to be a better option.

  • How to connect text boxes so that text flows from different boxes to others, on same page or other pages?

    How do you connect Text Boxes?  So that text flows from one to the other, on same page or following pages?

    I am paying for Serif's Affinity Designer, which I don't need, so Serif has seed money for Affinity Publisher, which I am hoping will prove just as good as A.D.
    I like Serif's attitude to its customers.
    They acknowledge that their customers actually have jobs, and just want tools that don't stop them doing their work.
    Apple sells tools for Selfies, but I've yet to meet anyone who makes a living out of taking and distributing them.
    Peter

  • How to apply text formatting immediately?

    Hello!
    I apply text formatting to the empty newly created text flow. It seems to be strange that the formatting is not applied immediately, but when I start editing.
    The small sample demonstrates the problem.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml"layout="
    vertical"creationComplete="onCreationComplete()"
    >
    <mx:Script>
    <![CDATA[
    import flashx.textLayout.events.FlowOperationEvent; 
    import flashx.textLayout.formats.ITextLayoutFormat; 
    import flash.text.engine.RenderingMode; 
    import flash.text.engine.FontLookup; 
    import flashx.textLayout.formats.TextLayoutFormat; 
    import mx.controls.SWFLoader; 
    import flashx.textLayout.edit.EditManager; 
    import flashx.textLayout.container.ContainerController; 
    import flashx.textLayout.elements.TextFlow; 
    private var textFlow:TextFlow; 
    private function onCreationComplete():void { 
    var container:Sprite = new Sprite();canvas.rawChildren.addChild(container);
    var containerController:ContainerController = new ContainerController(container, canvas.width, canvas.height);textFlow=
    new TextFlow();textFlow.flowComposer.addController(containerController);
    textFlow.interactionManager=
    new EditManager();textFlow.flowComposer.updateAllControllers();
    private function onClick():void { 
    var charFormat:TextLayoutFormat = new TextLayoutFormat(); 
    var containerFormat:TextLayoutFormat = new TextLayoutFormat(); 
    var paragraphFormat:TextLayoutFormat = new TextLayoutFormat();charFormat.fontSize=36;
    textFlow.interactionManager.selectAll();
    (textFlow.interactionManager
    as EditManager).applyFormat(charFormat, paragraphFormat, containerFormat);textFlow.interactionManager.refreshSelection();
    textFlow.flowComposer.updateAllControllers();
    ]]>
    </mx:Script>
    <mx:Canvas id="canvas"width="
    200"height="
    200" borderStyle="solid"/>
    <mx:Button id="button"label="
    Push me"click="onClick()"
    />
    </mx:Application>
    When you click the button new font size is set. But the cursor in text field is not changed to a bigger one until I start editing. Also if to look at the textFlow internals in debugger you can see that new font size is not set...
    How can I force this?
    Kind Regards

    This is arguably a bug with a few things conspiring to cause the problem.  The general idea is that each paragraph ends with a paragraph terminator and the final terminator isn't selectable - that seems to be the core of the problem.  The other conspirator is that with a point selection character level format changes aren't applied until the next character is entered.  So with an empty document you always have a point selection. I could see character level format changes applying instantly to empty paragraphs.  I'll file a bug for more investigation.
    As for workarounds - well there's always direction model calls - just set the format directly on the span.  Another possibility would be to detected exactly this case and insert a character and then undo it.
    Note in your sample code the refreshSelection and updateAllControllers calls after applyFormat are redundant and can be safely removed.  Also any of the formats passed to applyFormat can be null.
    Hope that helps,
    Richard

  • How to make text wrap like this

    Hello all.
    I am working with text, and want to have a similar effect to that in the picture.  What I mean by this is that I really like the columns, and how it indents when it needs to and the text still remains aligned across the columns.
    Any ideas on how to do this?  Thank you

    But this is the point of going with InDesign: that you put in your text so that you can harness the power of InDesign to flow it along the columns and wrap it around inserted blocks automatically.
    There's no point in simply copying images from Fireworks into InDesign. You'll just have some low resolution images in a layout program. It won't help.
    Open InDesign. Open your Fireworks file. Select each text object in Fireworks, and copy the text from the vector object. Paste the text into InDesign. Maybe paste it into a text editor, first, so you have it as all one block.
    Then, here's what you want to do in InDesign:
    text flow: http://www.designertoday.com/Tutorials/InDesign/5245/Text.Flow.InDesign.CS3.Tutorial.aspx
    and
    text wrapping: http://www.creativepro.com/article/on-the-move-to-indesign-wrapping-text (sorry, this one's really old, look in the documentation)
    Fireworks can't do either one of these things. Even Word and Acrobat (or another PDF creation program like Primo PDF) would work out better than Fireworks for what you want to create.

  • How to link text frames in Pages 5.2?

    How to link text frames in Pages 5.2?

    The correct term in Pages is Text Boxes, and true linking is not implemented in v5.2. You can Unite, Intersect, Subtract, and Exclude multiple Text Boxes via the Arrange panel. These attributes only appear when two or more Text Boxes are selected. Also, on the Arrange menu, you will need Object Placement set to Move with Text, and the Text Wrap set to None for more accurate positioning.
    In the following example, there was initially a Text Box with overflowing text that was duplicated. With both Text Boxes selected and aligned, I could then use the Unite feature from the Arrange panel. This allowed the text to flow into the second box. Selecting text in one box and dragging upwards continues the text selection between both boxes. Hoefler italic applied in one box is applied to both. Appropriately placed, another trip to the Arrange panel to enable Text Wrap around and text fit adjustments.

  • How to align text in margin with text in document

    I am using InDesign CS3 and am trying to figure out how to add text to the left of my document where there are figures and tables (so I can later create a table of figures and table of tables). I cannot get the text "Figure 1", "Figure 2", etc. to line up horizontally in the left margin with the figure I placed in the center of the document. What am I doing wrong?

    > What am I doing wrong?
    It's hard to say what you're doing wrong without first knowing what
    you're doing. How are you trying to line up text with figures? In what
    way does it not work?
    Kenneth Benson
    Pegasus Type, Inc.
    www.pegtype.com

  • Two Column Text Flow Problem

    Aside from Pages not importing Word (from a Mac) properly when there's columns involved I have another column problem.
    I'd like to find a way to make a document that has two equal side-by-side columns, lets call them Column A on the left and Column B on the right. So when I start typing in Column B on the right and reach the bottom of the page the text continues on that new page in Column B.
    As far as I can tell it's impossible to do this as every time I reach the end of a page, the text jumps to the left into Column A. Is there any way to set it up so when you type in one column pages automatically jumps to that same column on the next page without having to add section or layout or column breaks for every single page?
    This is a bit of a nightmare. It seems Pages can't do a simple two column document as it insists on linking them together for every new page it creates as you type text.
    Can anyone help me?

    There are definitely some liimitations in how Pages handles its flow of information. I dislike the fact that once you have placed your pages the way you want from the pages within a template there is no way of having the text automatically flow from one to the next (irritating since some of my templates are designed to be journals)
    Pages won't do what you want. I am sure there are programs which are better suited to do so because they are designed for that particular market. I thank you, however for not stamping your feet and demanding that it be the very next thing for them to accomplish on their growing list of things to do next.
    (and I tried a few different things, hoping to figure out a way to do this. One of which was to design a templlate which was half the width of a sheet of paper. It was determining what was placed on the second side which was difficult.)
    now, of course, depending on how long your document was going to be you could try something different by making an infinitely long sheet of paper. At every point where the header would be you just incorporated a text box or shape with a wrap so your text would skip down to the next virtual page.
    Of course, this sounds like far more work, and distracting to the natural creation process of a writer. Find the software which removes itself from your creative juices and lets you concentrate on being the awsome writer you are.
    Just my 2¢ CDN (about half a penny US.)
    Gerry.

  • Text flow around objects such as giraffe neck in sample

    Hi
    I am new here. I bought pages yesterday. Awesome app. On the example pages there is a giraffe and the text flows around it's neck. When I tried to do something similar the text only flows around the whole square image imported regardless of white space. How do you get text to flow around non square objects.
    In the getting started there is a butterfly and the golden viewer. In those cases the text also flows around the non square shape of these objects
    Do you need an app to cut out such objects and paste them direct into pages?
    Or in other words : how did they get the text to flow around giraffe neck?
    Thanks a mil
    Corne

    Corne ~ Welcome to the discussions. See this Help page:
    http://help.apple.com/iwork/1.3/safari/index.html#tan72488c93
    ...If following the instructions there for "+Wrap text around an object"+ doesn't do it, it implies that you'll have to cut around the image first. And this phrase there, seems to suggest that you'll have to cut around first:
    "Especially if you have images with irregular outlines, you can use text wrap to create visually playful layouts in which the text follows the contours of the image."
    And there's more online support for iPad's Pages app here:
    http://www.apple.com/support/ipad/pages

  • Text Flow around objects

    I have a two-column book with photographs/diagrams of different sizes. On occasions where these extend into the second column, the text flow is often uneven across the two columns. I can get the text in the right hand column to move down, but not the left to move up. (page 11) Sometimes the same sort of thing applies with the photo just in one column - the left and right text blocks don't line up. It's probably something simple I am missing, but what?
    Another issue on similar lines concerns any box/photo/line/object I put in place. When I started with the program, I experimented a little with the Text Wrap settings. Somehow these became accepted as default, and every new line/box etc comes in with these settings I then have to alter. How do I change these default settings? I have re-set it any number of times, it still comes back to my first experimental values.
    I am using CS6 InDesign on an i-Mac with OSX 10.6.8.
    Thanks, Les

    CAPTAINLES46 wrote:
    - the left and right text blocks don't line up. It's probably something simple I am missing, but what?
    Check the Help files for an explanation of how to use the Baseline Grid feature. It's not fun, but it fixes your problem.
    CAPTAINLES46 wrote:
    Another issue on similar lines concerns any box/photo/line/object I put in place. When I started with the program, I experimented a little with the Text Wrap settings. Somehow these became accepted as default, and every new line/box etc comes in with these settings I then have to alter. How do I change these default settings?
    To change the default for the current document, set it to None with nothing selected.
    To change the default for all future documents, set it to None with no document open.

  • Editor doesn't see text flowing around object

    I've placed a psd file with a transparent background and next to it a text frame. The text flows around the non transparent parts of the object. When the editor opens the file, the image shows as kind of a preview version. Light coloured and with a non transparent background. But what's worse, the text isn't flowing around the object. Instead it flows around the object frame. See attached image. Left the view in Incopy, right in Indesign as it should be. What is causing this? When the editor edits the text and I open it again in Indesign, the text still flows around the man.

    Both are CS3. I save the Indesign (with the correct text wrap around the alpha channel) and the assignment is opened in Incopy at a remote location (where ever the editors are). They see the image with the text wrapped around the image frame instead of the transparent part.  The can edit the file and when I open it in Indesign again, the text flows around the non transparent parts again. The Indesign file is a new document. Doesn't matter whether I open the ID or IC file, both open with the text wrapped around the object. Only when the editor opens the IC file the text is wrapped around the image rectangle.

  • Text Flow in ePUB and Accessible PDF

    I have a newsletter in InDesign.  I have all the text flow marked.  Each article is a separate "story".  Story1 flows onto page 2, with the text flows linked correctly.  On page 2, story2 begins in the text box below the end of story1.
    So on page 2, why does accessble pdf read story2 before the second portion of story1?
    I have the same behavior in the version extracted to EPUB.
    Any ideas what I am doing wrong? or how I can correct it without having to create a single column of text throughout?
    Thank you,
    Joyce

    I've never seen that. In both accessible PDFs and EPUB, when I export all of a story will be read before going on to another object.
    What version of InDesign are you using? If you're using InDesign CS5.5 or later, you can use the Articles panel to set the reading order for accessibility (or for EPUB).

Maybe you are looking for

  • HT201250 can a time capsule be used as just a backup for data without being connected to a home network?

    This is the explanation for my my question about whether a time capsule can be used as a backup without being connected to a network.  I had to disconnect my time capsule when I upgraded my landline to a wireless home phone in order to go to a wirele

  • Ipad mini (not retina) purchase question

    Hi, If I bought an ipad mini from an apple store tomorrow (not the retina one), would it come with ios6 pre installed?

  • Axis fault using 9514 module. How do I remove it?

    Hello, I have a 9074 cRIO controller, and i made a project with a simple VI for a single axis move. I set up a new axis on Module1 (9514) and i just moved it up in the project file tree under "My System" from the "Remote System". Than, I called it as

  • JAAS 1.0 sample error

    I was trying to run the JAAS1.0 sample on win2000, jdk1.3. I have followd the steps with regard to the classpath and editing the policy files (with '/') etc. But when I run it I get this error: C:\jaas>java -classpath lib\jaas.jar;doc\samples\sample.

  • Quick Selection Tool won't deselect

    I can't seem to deselect an area that mistakenly was selected. I pressed the Alt key but it won't deselect the area. Am I not doing something I should? Also where can I find some tutorials on using the Quick Selection tool. I am using CS5.