Skip to main content
Participant
January 29, 2018
Question

Is it possible to automate an end of story marker?

  • January 29, 2018
  • 2 replies
  • 1323 views

Hello world,

I've figured out how to save a logo icon as “Graphic” in my Library and planning use it as an “End of Story Marker” (versus copy/pasting every time in magazine stories). So is there a way to automate this to a Story without having to open Libraries and inserting it manually? I am new to GREP Styles and Scripts in InDesign, but thought someone here might have a solution before I dive into that abyss?

Thank you!

This topic has been closed for replies.

2 replies

rob day
Community Expert
Community Expert
January 29, 2018

You can use a GREP F/C to insert a glyph, but I don't think there's a way to use find and change to insert a graphic, so you'll probably need a script.

This simple AppleScript (OSX only) would insert the contents of your clipboard at the end of every story in the active document. You would have to consider whether you really want the graphic at the end of every story.

tell application "Adobe InDesign CC 2018"

    set s to every story of active document

    repeat with t in s

        set selection to insertion point (index of last insertion point of t) of t

        paste

    end repeat

end tell

So here I've sized and positioned an object, which is inserted at the end of a story.

I can select the graphic and cut it from the text flow and run the script, which pastes it at the end of all of the doc's stories

vinny38
Legend
January 29, 2018

Rob, you can copy into clipboard and use ~c

Example : find \.\z

Replace $0~c

rob day
Community Expert
Community Expert
January 29, 2018

Yes that works, thanks.

Both have the problem of pasting the clipboard content into every story of the document. A more complex script could check for particular stories.

cinziamarotta
Participating Frequently
January 29, 2018