It is scriptable to unscrew the paragraphs [or lists] to get blocks of text?

The method I use is to break a story in many pages, split a block of text via the menu "Save options" + ' paragraph 'start' on the next page and then apply a script which unscrew all of the text. " But a lot of time and work involved not to mention that the stories not threads isolated in dozens of pages.


But my scripts known to wire/unscrew the text might only manage the frames and never paragraphs.


The idea is to convert this kind of paragraph/lists in four simple stories

Fig. 180 - risk 2010-2014

Fig. 181 -number of devaluation 2009-2014

Fig. 182 - Inflation 2008

Fig. 183 - average index of prices

Probably a hiccup of copy/paste of my own:

var main = function() {
  var ps, n;
  var hu;
  if ( !app.documents.length ||
  app.selection.length!=1 ||
  !(app.selection[0].properties.parentStory) ){
  alert("Please select a text frame");
  return;
  }

  hu =  app.activeDocument.viewPreferences.horizontalMeasurementUnits;
  vu =  app.activeDocument.viewPreferences.verticalMeasurementUnits;

  app.activeDocument.viewPreferences.horizontalMeasurementUnits =
  app.activeDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.POINTS;

  ps = app.selection[0].parentStory.paragraphs;
  n = ps.length;

  try {
  while ( n-- ) {
  createFrame ( ps[n] );
  }
  }
  catch(err){
  $.writeln ( ">>>"+err );
  }

  app.activeDocument.viewPreferences.horizontalMeasurementUnits = hu;
  app.activeDocument.viewPreferences.verticalMeasurementUnits = vu;
  if ( app.selection[0] instanceof TextFrame ) {
  app.selection[0].remove();
  }
  else {
  app.selection[0].parentTextFrames[0].remove()
  }
}

function createFrame (p) {
  var x1 = p.insertionPoints[0].horizontalOffset,
  x2 = p.insertionPoints[-2].endHorizontalOffset,
  y2 = p.characters[0].baseline,
  y1 = y2-p.characters[0].pointSize+3.35;
  y2+=5;
  var tf = app.activeDocument.layoutWindows[0].activePage.textFrames.add({geometricBounds:[y1,x1,y2,x2]});
  p.duplicate ( LocationOptions.AT_BEGINNING, tf.insertionPoints[0] );
};
var u;
app.doScript ( "main();", u, u, UndoModes.ENTIRE_SCRIPT );

Try again?

Tags: InDesign

Similar Questions

  • I disabled the menu and cannot access the drop-down list to get back them

    I disabled all the menus to make a screenshot and now I can't access the drop-down list to get back them

    This has happened

    Just once or twice

    is today

    You can hide the menu bar in Firefox 3.6 on Windows, on "view > toolbars" or via the contextual right click menu on a toolbar.
    Press in and hold the Alt key to display the menu bar.
    Go to "view > toolbars", right click on the menu bar, or press Alt + V T to select the toolbars to show or hide.

    See also what happened to the file, edit and view menus?

  • pushing the paragraph down to make room for additional text

    Hello

    I work in Acrobat Pro XI. Is there a way to get points for having pushed down and spread on successive pages when I add text to a document?

    What I mean is the following: suppose I have two paragraphs on a page. Together, they cover the entire page. I want to add text to the first paragraph, a few sentences at the end. This will result in these additional phrases which overlap with the beginning of the second paragraph. Is it possible at this stage to tell Acrobat to push the second paragraph down in order to get rid of the duplication? And if so, is there a way to split the second paragraph in the current page, sure it is, and the next page (which is so that the end of the second paragraph does not disappear just above the bottom of the first page)?

    I would do it manually, but I'm looking for a way to do it for several paragraphs. Suppose that there are 20 paragraphs after that I add additional text. Setting each of them would be tedious, and it would be much more effective if there was a way to get Acrobat to do it automatically.

    Thank you

    Pushing down you can do with the tool of the object. However, he saw to extend to the next page is not part of the structure of a PDF document. For this edition, you should go back to the original document, make the changes, and then create a new PDF.

  • [JS] [CS3] Change the type of content in a block of text

    Hello

    an hour, maybe a little basic but I'm stuck on this...

    I need a textFrame to become a graphical object.

    The textFrame has no content.

    How can I change the contentType for this item?

    Thanks anticipately.

    It sounded like an interesting challenge, so I take a shot at him. I have created a new document and adds three blocks of text (uninhabited) on the first page. I have them the tag 'Image', 'legend' and 'credit' I've then exported as an extract, deleted the document and has opened a new. Then I placed the excerpt (so far, all manual summer - no script) and indeed, the snippet placed and executives have been added to the structure of the document and have been correctly labelled - the three tags were created automatically by the Act of placing the code snippet.

    So, we will duplicate this in a script. Even though I know exactly where the extract is, I'll ask the user to find. In this way, I eliminate the problem to get the path to the incorrect code snippet:

    var myDoc = app.documents.add();
    var myPage = myDoc.pages[0];
    var myPlacePoint = [myPage.marginPreferences.left, myPage.marginPreferences.top];
    var mySnippetFile = File.openDialog("Choose the snippet");
    if (mySnippetFile == null) { exit() }
    var mySnippet = myPage.place(mySnippetFile, myPlacePoint);
    

    And it worked. The excerpt is on the page, exactly where I wanted. So now we have to find the block of text with the tag 'image '. First of all, we need to study just is that mySnippet.

    OK, this is a picture of three stories. It's a little weird. Why isn't there a table of three blocks of text? I wonder what happens if two executives in the extract are threaded - but we'll deal with it later, after we would solve the immediate problem. The fact is that we know that the code snippet consists of three separate text blocks that are not threaded. So:

    for (var j = mySnippet.length - 1; j >= 0; j--) {
         var myTag = mySnippet[j].associatedXMLElement.markupTag.name;
         alert(myTag);
    }
    

    What gives me the three tags (and reminds us that when you tag a text block, you are also marking the history it holds. So:

    var myDoc = app.documents.add();
    var myPage = myDoc.pages[0];
    var myPlacePoint = [myPage.marginPreferences.left, myPage.marginPreferences.top];
    var mySnippetFile = File.openDialog("Choose the snippet");
    if (mySnippetFile == null) { exit() }
    var mySnippet = myPage.place(mySnippetFile, myPlacePoint);
    for (var j = mySnippet.length - 1; j >= 0; j--) {
         var myTag = mySnippet[j].associatedXMLElement.markupTag.name;
         if (myTag === "Image") {
              var myFrame = mySnippet[j].textContainers[0];
              myFrame.contentType = ContentType.graphicType;
              break;
         }
    }
    

    And who does the work.

    Thomas,

    You were very close, but you forgot that text blocks that make up a story are addressed as textContainers of CS3 from. Your code worked in CS2.

    Dave

  • I'm watching a commercial Web site in the United States (I'm in the Canada) and I'm getting blocked by something called SONICWALL - how can I get rid of this?

    What is SONICWALL & how can I stop it blocking my attempts to access a Web site?

    Hello

    What is the site?

    Check with the support of SonicWall

    SonicWall
    http://www.SonicWALL.com/

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • With the help of Master pages and blocks of text

    Hello

    I created a text frame on a master page and you have specified a style

    Can I add my custom text on the text block by pressing ctrl + Maj + text block.

    If I change the style, it applies to all pages.  But if I move or resize the text block on the page master it does not apply to all pages because it has become its own layer on this page.

    What do you do before you can change the text block and the master page and still be able to add your own content in pages that depend on the master page.

    Thanks a lot for your help

    Why do you need to replace the title of the page?

    Use either a text variable, a section marker or create another master page based on this master page with a different text in the placeholder. Only the content will appear on the pages, everything else, like running headers or page numbers or artifacts have a place on the master page without replacing them.

    When you later create accessible PDF or EPUB this difference is important. You can read high voice content in Acrobat for accessibility, that text on the page, not the master is used for this, and when you export an EPUB page only elements, not the master are included as it should.

    If you need text to expand, when something changes, create your page with margins and borders that will help to make changes later.

  • After downloading CS6, I try to open the .exe file and I get only a text file.

    I'm on a MacBook Pro and I have followed all the instructions, downloaded the Akamai Download Manager, and then the giant 4.79 GB download began.  When it was over, nothing happened, so I clicked on the DesignWebPremium_CS6_LS16.exe and a file in TextEdit keeps opening.  Without Akamai, no installation, nothing.  Then I clicked on the other file downloaded (giant) and I was prompted to choose an application to open.  I sailed the Akamai NetSession and after a long pause, I git a dialog box telling me that Akamai is unable to open this type of file.  I erased my downloads and re-uploaded a couple of times and continues to be the same thing.

    Hi aslalsdkg,

    Please make sure that you have downloaded the correct file as it seems that you have downloaded the file for Windows.

    The .exe file is intended to be run on Windows. MAC Installer has the .dmg extension

    Try to download the software from the direct links on the page: http://prodesigntools.com/adobe-cs6-direct-download-links.html

    But make sure you follow the instructions mentioned on the page before you start the download.

  • Ability to export or place the InCopy file to represent a block of text online.

    I need only a text that is in a text frame inserted by representing it with a single InCopy file.

    If I can do if I needed in the future a change that InCopy file and then all the necessary steps to update links inside all files in InDesign...

    Screen shot 2010-10-24 at 6.19.59 PM.png

    I asked this question for two years and no one gave me an answer because there is no answer.

    But I have developed an add-on, represented by a menu:

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

  • selecting a value in the drop-down list but page must not get recharged again.

    Hello
    I created a drop-down list. After you have selected a value from him, I can get a value in the box of text below according to updon one sql query. but the problem is that I HAV to select Page Action when the changed value parameter to the set value and redirect. Thanks to her whenever I have to select a value from the drop-down list, page get updated. Is there a way that will satisfy the requirement but page does not get new dependants.
    I use apex 4.2.
    Thank you

    You can create A dynamic Action to set the value while changing the value in the Select list (drop-down list).

    Event: change
    Selection type: item (s)
    Article (s): choose your selection list item
    Action: Execute the PL/SQL Code
    PL/SQL code:

    begin
    select colum_name into :Px_text_item_name from table where column_name=:px_select_list_name;
    end;
    

    Page elements to send: px_select_list_name
    Page referred to return: Px_text_item_name

    Its work for me without refreshing the page. Assume that, if you want to pass this value to the element in another page, then use the branch for redirection and assign the value to the element on the page of another.

    Thank you
    Lacombe

  • How to unscrew the entire blocks of text?

    Hi all

    (I) reproducing the issue:

    1 - Create a new document with (Master text frame).

    2 - place a file that needs 100 pages for example.

    How to unscrew all of these frames 100 text automatically?

    (II) If you unscrew the two main text blocks, the pages that you insert will be without text frames.

    How to insert pages with no threaded text blocks?

    Thank you.

    It is a script installed in the samples called SplitStory.jsx to break a sory. Don't forget that makes InDesign thinks that each image starts a new paragraph, whether or not break the bgins pause in mid-sentence, and even less to a paragraph. This can cause some strange problems of remelting and indentation according to the styles in use.

    If you unscrew the frames on the master page, you will have two independent test flow paths. Placement and autoflowing a story on the first page will add enough pages the whole story runs only on odd or pairs (depending on where you start) pages.

    You don't need (and many, perhaps more) do not use experienced users, the main text blocks. They end up causing more trouble than they are worth most of the time. Set the margin guides to the desired size, text blocks, and ID uses the guides during automatic placement operations to perform new frameworks.

  • ThinkPad Yoga 14 - cannot unscrew the back cover

    I just bought a Yoga 14 TP. I'm looking to replace the hard drive with an SSD. A video on youtube, I checked and I just need to remove the screws from 8-10 on the rear cover and then pull it out completely round hinge. But for some reason, I can't unscrew the tiny screws and proceed to their removal. I use a screwdriver 00 but I tried others. It seems that the screws are unscrewed, but they don't pop, even if I hit the back of the case with my hand. I tried using tongs to hit against the screwdriver stall the in and rotate using the clamp as I've seen in some videos, but it doesn't seem to help. Is there an automatic screwdriver and the size I would be using or else I can buy (amazon, home depot), let me know. Thank you

    Thank you

    I found the answer on another Board

    Here's the captive screws. They are not designed to remove completely and are usually attached to the backplate

    I can always remove the backplate when they unscrewed to halfway

  • DeskJet 3522 e AiO: how unscrew the head of pint to rinse?

    I found a black movie on youtube on how ti rinse the printhead during printing doesn´t, but it ´s not the same kind of print head. I can't loosen mine.

    It is possible to unscrew the printhead on my deskjet modell 3522nd isn´t.

    So now, we bought a new printer when the printer head is I have included the ink, which was cheeper than to leave the service of the printer.

  • A document I had previously recorded on my flash drive. All of a sudden the paragraph symbol appeared at the beginning of each line in the document and in documents on flash drive

    Original title: Word 2003 Documents

    I was working on a document I had previously recorded on my flash drive.  All of a sudden the paragraph symbol appeared at the beginning of each line in the document and all documents on the flash drive.  In addition, it appears on every document in the my documents folder.

    Can anyone help?

    Google search:

    How do I turn off paragraph symbol in Word 2003

    "You should have a paragraph symbol button in the bar... click on this tool and formatting symbols will disappear."

  • Change the paragraphs found in the standard paragraph style?

    I have look here for about an hour and could not find a discussion for this.  I see where it clears the substitutions but not change Style all together.  Here's what I need help do.  If I left saying text 4 selected boxes, I want the power to change the standard paragraph to paragraph and character set to None style style. If there is already can a discussion that I missed in this regard you point me in that direction.  If this is not the case, can I please help with this.

    You can usetpk1982of script to change all the paragraphs of the standard paragraph. But if you only want the block of selected text, then you will need to adjust thescript to change paragraph styles in the selected text frames.

    basically replace line 2 by var allTFrames = app.selection;
    Also, if you need to clear character styles need to do before you change the paragraph style or character styles will be removed and the formatting will be left as a local override.  Your final script after that these changes would be:

    myDoc var = app.activeDocument;

    var myTFrames = app.selection;

    for (var i = 0; i)< mytframes.length;="" i++)="">

    var tFrame = myTFrames [i];

    pStory var = tFrame.parentStory;

    var allParas = pStory.paragraphs.everyItem ();

    pStory.characters.everyItem () .appliedCharacterStyle = app.activeDocument.characterStyles [0];

    allParas.appliedParagraphStyle = app.activeDocument.paragraphStyles [1];

    }

    Note: instead of simply replacing the 2 wire I also changed the name of the variable to reflect rather than leave it in the form allTFrames; and add line 7... Other than these two changes everything was the script of tpk1982

  • How to insert an ellipsis in the paragraph style?

    Hi all

    In the paragraph style, how to insert the selection to the last paragraph symbol.

    Please someone help me solve this problem.

    I have attached the screenshot of the sample. Like that, I have to insert "selection" symbol (three points) in the indesign paragraph style options.

    ellipse.jpg

    Very simple to do this, follow these steps

    1. double click on the paragraph style if you created (if this isn't the case create a new paragraph style, see the image)

    2. in paragraph style options, choose paragraph nets and do all the settings, see the image

    Hope this will help you

    Thank you

Maybe you are looking for

  • Satellite L850-13R - internal video card cannot be detected

    Hello guys,. Two months ago I bought above mentioned model and I have problem with his video card Intel internal - Intel HD 4000. The problem is that it cannot be detected. Someone with the same model has the same problem?

  • Solutions HP does not recognize my HP Photosmart C3180 printer

    When I click on the HP Solution Center, I get the message: No. HP items found. Reinstall the drivers C3180 would help, or is the problem with the configuration of the HP Solution Center? Fine prints, scans to make copies, but I want to scan to a file

  • RECEIVES SOUND THROUGH LG 42 INCH TV WITHOUT PC SPEAKERS IS CONNECTED.

    I hooked my home edition of windows vista to my lg 42 inch tv. Also, my husband is gone & had a connection, allowing the sound to play through the TV speakers. It also disconnected pc to use on another pc, speakers & now will not play sound through t

  • Venue 7 mobile broadband via SIM card

    Someone used a SIM card on the Tablet 7 meeting place to connect to mobile broadband?  I'm moving in Europe and thinking buying a SIM card for use during a trip.  I wanted to see if anyone has experience linking a Tablet 7 place via a SIM card.  Than

  • ISCSI Boot B200 M2 need, but get 'not enough available vNIC.

    Hello I'm trying to implement initialization iSCSI ESXi on a B200 M2 w / M71KR-Q card above. I add vNIC A and B (each linked to a fabric respectively), but trying to implement a vNIC iSCSI - I get the error «not enough vNIC» available Looking around,