Can Apply Next Para Style be scripted?

Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / Can Apply Next Para Style be scripted?

Viewing 5 reply threads
  • Author
    Posts
    • #66968
      Matt Mayerchak
      Participant

      Hi,

      I’m starting a project where I’m going to have pages of text that have the same series of 7 paragraph styles in a row. They are set up with Next Styles in the para style definition, so I can highlight the text, right-click on style 1 and apply style 1 then next para style and style all 7 paragraph styles at once. So far so good.

      I’m going to need to do this about 1,500 times over the next few months. One series of paragraphs per page, in batches of about 15-20 pages at a time. I know I can’t apply a keyboard shortcut to “apply para style 1, then next style”. But, is this something that can be implemented with a javascript? Because if so, the script can be assigned a keyboard shortcut.

      Is this possible in InDesign javascript?

      They are not ALL exactly the same 7 styles, but close enough that it’s worth doing this way. And no, the client won’t give them to me in an Excel file so I could import as a mail merge. They are Word files, straight text with underlines for italics, but no other formatting (no style mapping etc.)

    • #68549
      rydesign
      Member

      I am with you on this one… There is a keyboard shortcut? Where?

    • #68551
      Matt Mayerchak
      Participant

      No, unfortunately there is not a keyboard shortcut for apply [current paragraph style] then next styles for the selected text.

      I ended up paying for a custom script to be written, which can be triggered by a shortcut. (Any script can be assigned to a keyboard shortcut.)

      The script looks for particular phrases that pertain to my project and starts the sequence of styles at that point and continues until it sees the phrase again, so it goes in a repeating cycle pattern.

    • #68721
      rydesign
      Member

      Awesome that ID is capable of so much extensibility. Hoping for a keyboard shortcut in the future hahaha

    • #70991
      Oleh Melnyk
      Member

      Hi there!

      I was searching for a keyboard shortcut for apply next style for a long period of time too, and, actually I found it!

      All you need is to create an object style, under Basic Attributes go to Paragraph Styles, select the first paragraph style and don’t forget to put the check mark on Apply Next Style… that’s it – now you can switch to General and set your Shortcut…

      Cheers!

    • #71082
      Matt Mayerchak
      Participant

      Yes, this works – I covered it at an IDUG meeting a few years ago. It’s pretty cool, but unfortunately it only works on unlinked (unthreaded) text frames.

      It’s a great technique if each story is in it’s own frame, but that’s rather atypical for long documents. If you want to find each A Head and start the series of Next Styles there, and you have threaded text frames, it won’t work.

      But, if you have the kind of document where each story can be in its own frame and they are not connected, it is worth knowing that this is a way to apply next styles via an object style.

Viewing 5 reply threads
  • You must be logged in to reply to this topic.
>