4 Replies Latest reply on Sep 20, 2015 3:27 AM by Peter Spier

    Autoflow not working as expected (and also a totally dumb question about scripts)

    philosoraptor

      Okay, here's the scenario:

       

      • I'm on page M of an M+N page document, where N is substantially more than zero. On that page is a text frame which has WAY more text than can fit on one page, or even one spread. So it's showing the out port (red + sign in the lower right), as expected.
      • Page M+1 is a blank page I've just inserted.
      • Pages M+2 through M+N have text frames on them with other, unrelated text.
      • What I did: Clicked the out port, held down Shift, and clicked on the upper left corner of the printable area of page M+1.
      • What I expected to happen: The excess text would flow into the frame and keep going, creating new pages as needed so as to hold it all without messing up pages N+2 and up.
      • What happened instead: The excess text flowed in on top of the already-existing text once it reached page M+2, creating an ugly, unreadable mess.

      Why? And more importantly, is there a straightforward way to get the "what I expected to happen" thing to actually happen?

       

      A second, totally unrelated question:

       

      I ran into a script that sounded useful the other day. So I copied it into Notepad and saved it to the appropriate Scripts Panel folder, and it shows up in Indesign as expected. So far so good. But I can't figure out what extension I should save it with. I haven't written code in over twenty years so I haven't got nearly enough of a clue to tell just by looking at the code what scripting language it uses. If I save it as a .jsx, I get an error message when I try to run it. If I save it as a .vbs, I get a different error message when I try to run it. If I save it without an extension, all that happens when I try to run it is Indesign goes "ding" . Same if I keep the default .txt extension, plus a little voice laughs at me and says "you didn't really expect that to work, did you?". How do I figure out what extension I should be using?

        • 1. Re: Autoflow not working as expected (and also a totally dumb question about scripts)
          Ellis home Level 4

          Inserting pages in the middle of a threaded document is tricky. The best way I found without mayor hassle is using Rorohiko's free plugin: https://www.rorohiko.com/wordpress/indesign-downloads/textstitch/. Read the instructions carefully. Regarding the script, this might help: http://indesignsecrets.com/how-to-install-a-script-in-indesign-that-you-found-in-a-forum-o r-blog-post.php. But it seems you already did it, so it might be something else. What is the script?

          • 2. Re: Autoflow not working as expected (and also a totally dumb question about scripts)
            Peter Spier Most Valuable Participant (Moderator)

            There's another possibility here, too, and that's how/where you clicked the loaded cursor and what was already on page M + 1, M + 2 and beyond.

             

            Ideally, you would have held down the shift key when you placed the text initially, but the same possible problems arise no matter when you start auto-flowing if you have master text frames. You mentioned you clicked on the upper left corner of page M+1. Did it have a master page placeholder text frame? If so you would have wanted to use that frame, and in order to do so you would need to click INSIDE the frame area, NOT on any guides (watch the loaded cursor and be sure it is surrounded by parentheses).

             

            Clicking on a guide would ignore the master frame and would continue to autoflow text onto following pages adding new frames on top of any master text frames regardless if they already were overridden and had text in them or were empty. Similarly, if pages M+1and M+2 through N share the same master page and you attempt to autoflow, ID is going to flow the text from M+1 to M+2 and beyond and add new frames UNLESS the text on pages M+2 through N and beyond is in the same thread already (which it cannot be if you have overset text on Page M). Using a different master page should alleviate that, causing ID to create new pages based on the second master rather than flowing over existing pages.

             

            As far as the script problem, it could be the script is written in AppleScript, and that won't work on PC.

            • 3. Re: Autoflow not working as expected (and also a totally dumb question about scripts)
              philosoraptor Level 1

              The script turned out to be fine. The correct extension was .jsx. The problem was that somewhere in the process of copy/pasting it from the Web to Notepad, something decided the straight quotes really should be curly quotes. Which normally would be correct (though not the way it ended up being implemented here), but in the case of a script obviously is not. Even my rank amateur *** knows enough about coding to know that. Once I put the quotes back in order, everything worked out fine.

               

              There are no text frames in the main body of my master pages (there are for running header elements, but surely that's not relevant here). I don't remember what the problem with them was, but they caused problems with the way my workflow worked in the early days of my current project. I've just been placing or (and this usually seems to be preferable in practise) creating a text frame and pasting, then using the out port -> shift+click method. This was fine until I needed to do it in the middle of a document.

              • 4. Re: Autoflow not working as expected (and also a totally dumb question about scripts)
                Peter Spier Most Valuable Participant (Moderator)

                Without a master thread, and a single master page applied, the normal behavior for autoflow is exactly what you experienced. Smart Text Reflow might have worked better.

                 

                Glad the script worked out for you.